diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden index fd416dd8ea..f51c28f38d 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden @@ -34,6 +34,7 @@ ARGS: [pools.{index}.kubelet-args.{key}] [pools.{index}.upgrade-policy.max-unavailable] The maximum number of nodes that can be not ready at the same time [pools.{index}.upgrade-policy.max-surge] The maximum number of nodes to be created during the upgrade + [pools.{index}.zone] The Zone in which the Pool's node will be spawn in [autoscaler-config.scale-down-disabled] Disable the cluster autoscaler [autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes [autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking) diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden index d9ce38bd27..80c90a5e13 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden @@ -30,6 +30,7 @@ ARGS: [kubelet-args.{key}] [upgrade-policy.max-unavailable] [upgrade-policy.max-surge] + [zone] The Zone in which the Pool's node will be spawn in [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index 9c75f16f0e..278c7ae053 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -372,6 +372,13 @@ func k8sClusterCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "pools.{index}.zone", + Short: `The Zone in which the Pool's node will be spawn in`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "autoscaler-config.scale-down-disabled", Short: `Disable the cluster autoscaler`, @@ -1123,6 +1130,9 @@ func k8sPoolList() *core.Command { { FieldName: "ClusterID", }, + { + FieldName: "Zone", + }, { FieldName: "Region", }, @@ -1248,6 +1258,13 @@ func k8sPoolCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "zone", + Short: `The Zone in which the Pool's node will be spawn in`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {