From 8fce55eb52f74ca837b33f58fd4fc0af72f2e3d5 Mon Sep 17 00:00:00 2001 From: tytv2 Date: Thu, 16 Apr 2026 09:55:39 +0700 Subject: [PATCH] docs: add get-quota page and enforce GitHub Pages update in dev workflow - Add docs/commands/vks/get-quota.md command reference page - Add get-quota entry to docs/commands/vks/index.md and mkdocs.yml nav - Update CLAUDE.md, CONTRIBUTING.md, docs/DEVELOPMENT.md, docs/development/contributing.md to require GitHub Pages docs update (command page + index.md + mkdocs.yml) as mandatory step when adding any new command Co-Authored-By: Claude Sonnet 4.6 --- .../next-release/feature-vks-rcdzj908.json | 5 ++ CLAUDE.md | 10 +++- CONTRIBUTING.md | 3 + docs/DEVELOPMENT.md | 9 ++- docs/commands/vks/get-quota.md | 55 +++++++++++++++++++ docs/commands/vks/index.md | 6 ++ docs/development/contributing.md | 3 + mkdocs.yml | 2 + 8 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 .changes/next-release/feature-vks-rcdzj908.json create mode 100644 docs/commands/vks/get-quota.md diff --git a/.changes/next-release/feature-vks-rcdzj908.json b/.changes/next-release/feature-vks-rcdzj908.json new file mode 100644 index 0000000..d21b886 --- /dev/null +++ b/.changes/next-release/feature-vks-rcdzj908.json @@ -0,0 +1,5 @@ +{ + "type": "feature", + "category": "vks", + "description": "Add get-quota command reference page to GitHub Pages docs" +} diff --git a/CLAUDE.md b/CLAUDE.md index f6a12aa..85202c2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -114,13 +114,21 @@ GOOS=windows GOARCH=amd64 go build -o grn-windows-amd64.exe . **Docs to check:** -- `docs/` (GitHub Pages) — command references, usage guides +- `docs/commands/vks/` (GitHub Pages) — add/update command reference page, check `index.md` table +- `mkdocs.yml` — add nav entry for any new command page - `README.md` - `CLAUDE.md` - `CONTRIBUTING.md` - `docs/DEVELOPMENT.md` - `./scripts/new-change` — changelog fragment +**Examples:** +- Added a command → create `docs/commands/vks/.md` + add to `docs/commands/vks/index.md` table + add to `mkdocs.yml` nav +- Removed a command → delete doc page + remove from `index.md` + remove from `mkdocs.yml` +- Changed flags or output → update the command's doc page +- Changed auth/credentials → update README config section + CLAUDE.md security rules +- Changed project structure → update README structure + CLAUDE.md repository structure + Code without docs is not done. ## Key files diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f3e2d4a..92954f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,9 @@ docs(readme): update installation instructions 4. Add `validator.ValidateID()` for any ID args 5. Add `--dry-run` for create/update/delete 6. Add `--force` + confirmation for delete +7. Create `docs/commands/vks/.md` — command reference page +8. Add entry to `docs/commands/vks/index.md` table +9. Add nav entry to `mkdocs.yml` ## Adding a New Service diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 3db2413..737aeba 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -19,11 +19,16 @@ CGO_ENABLED=0 go build -o grn . ./grn vks --help ./grn vks --dry-run ... -# 4. Add changelog fragment +# 4. Update GitHub Pages docs +# - Create docs/commands/vks/.md +# - Add entry to docs/commands/vks/index.md table +# - Add nav entry to mkdocs.yml + +# 5. Add changelog fragment cd .. ./scripts/new-change -t feature -c vks -d "Add new command" -# 5. Commit + push +# 6. Commit + push git add . git commit -m "feat(vks): add new command" git push -u origin feat/add-new-command diff --git a/docs/commands/vks/get-quota.md b/docs/commands/vks/get-quota.md new file mode 100644 index 0000000..4b8f755 --- /dev/null +++ b/docs/commands/vks/get-quota.md @@ -0,0 +1,55 @@ +# get-quota + +## Description + +Get VKS quota limits and current usage for the current user, including maximum number of clusters, node groups per cluster, nodes per node group, and current cluster count. + +## Synopsis + +``` +grn vks get-quota +``` + +## Options + +No command-specific options. See [Global Options](../../usage/global-options.md) for flags available on all commands. + +## Output fields + +| Field | Description | +|-------|-------------| +| `maxClusters` | Maximum number of clusters allowed | +| `maxNodeGroupsPerCluster` | Maximum number of node groups per cluster | +| `maxNodesPerNodeGroup` | Maximum number of nodes per node group | +| `numClusters` | Current number of clusters in use | + +## Examples + +Get quota: + +```bash +grn vks get-quota +``` + +Output: + +```json +{ + "maxClusters": 200, + "maxNodeGroupsPerCluster": 20, + "maxNodesPerNodeGroup": 10, + "numClusters": 4 +} +``` + +Get only the maximum cluster limit: + +```bash +grn vks get-quota --query maxClusters +``` + +Check remaining cluster capacity: + +```bash +grn vks get-quota --output json | jq '.maxClusters - .numClusters' +``` diff --git a/docs/commands/vks/index.md b/docs/commands/vks/index.md index e14b0c1..215e4cf 100644 --- a/docs/commands/vks/index.md +++ b/docs/commands/vks/index.md @@ -35,6 +35,12 @@ grn vks [options] | [set-auto-upgrade-config](set-auto-upgrade-config.md) | Configure auto-upgrade schedule for a cluster | | [delete-auto-upgrade-config](delete-auto-upgrade-config.md) | Delete auto-upgrade config for a cluster | +### Quota + +| Command | Description | +|---------|-------------| +| [get-quota](get-quota.md) | Get VKS quota limits and current usage | + ### Waiter | Command | Description | diff --git a/docs/development/contributing.md b/docs/development/contributing.md index b762104..dfc7dca 100644 --- a/docs/development/contributing.md +++ b/docs/development/contributing.md @@ -18,6 +18,9 @@ go build -o grn . 3. Register in `cmd/vks/vks.go` 4. Add `validator.ValidateID()` for ID args 5. Add `--dry-run` for create/update/delete +6. Create `docs/commands/vks/.md` — command reference page +7. Add entry to `docs/commands/vks/index.md` table +8. Add nav entry to `mkdocs.yml` ## Adding a new service diff --git a/mkdocs.yml b/mkdocs.yml index 42ac770..b320aff 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -55,6 +55,8 @@ nav: - Auto-Upgrade: - set-auto-upgrade-config: commands/vks/set-auto-upgrade-config.md - delete-auto-upgrade-config: commands/vks/delete-auto-upgrade-config.md + - Quota: + - get-quota: commands/vks/get-quota.md - Waiter: - wait-cluster-active: commands/vks/wait-cluster-active.md - Development: