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 9fa6d95541..10d8f1f64b 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 @@ -38,6 +38,13 @@ ARGS: [pools.{index}.root-volume-size] System volume disk size [pools.{index}.public-ip-disabled] Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway [pools.{index}.security-group-id] Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone + [pools.{index}.labels.{key}] Kubernetes labels applied and reconciled on the nodes + [pools.{index}.taints.{index}.key] The taint key to be applied to a node + [pools.{index}.taints.{index}.value] The taint value corresponding to the taint key + [pools.{index}.taints.{index}.effect] Effect defines the effects of Taint (NoSchedule | PreferNoSchedule | NoExecute) + [pools.{index}.startup-taints.{index}.key] The taint key to be applied to a node + [pools.{index}.startup-taints.{index}.value] The taint value corresponding to the taint key + [pools.{index}.startup-taints.{index}.effect] Effect defines the effects of Taint (NoSchedule | PreferNoSchedule | NoExecute) [autoscaler-config.scale-down-disabled] Forbid cluster autoscaler to scale down the cluster, defaults to false [autoscaler-config.scale-down-delay-after-add] How long after scale up the 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 a0e7d359f3..14445464e7 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 @@ -35,6 +35,13 @@ ARGS: [root-volume-size] System volume disk size [public-ip-disabled] Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway [security-group-id] Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone + [labels.{key}] Kubernetes labels applied and reconciled on the nodes + [taints.{index}.key] The taint key to be applied to a node + [taints.{index}.value] The taint value corresponding to the taint key + [taints.{index}.effect] Effect defines the effects of Taint (NoSchedule | PreferNoSchedule | NoExecute) + [startup-taints.{index}.key] The taint key to be applied to a node + [startup-taints.{index}.value] The taint value corresponding to the taint key + [startup-taints.{index}.effect] Effect defines the effects of Taint (NoSchedule | PreferNoSchedule | NoExecute) [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/docs/commands/k8s.md b/docs/commands/k8s.md index 281264166d..2a29fea562 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -183,6 +183,13 @@ scw k8s cluster create [arg=value ...] | pools.{index}.root-volume-size | | System volume disk size | | pools.{index}.public-ip-disabled | | Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway | | pools.{index}.security-group-id | | Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone | +| pools.{index}.labels.{key} | | Kubernetes labels applied and reconciled on the nodes | +| pools.{index}.taints.{index}.key | | The taint key to be applied to a node | +| pools.{index}.taints.{index}.value | | The taint value corresponding to the taint key | +| pools.{index}.taints.{index}.effect | One of: `NoSchedule`, `PreferNoSchedule`, `NoExecute` | Effect defines the effects of Taint | +| pools.{index}.startup-taints.{index}.key | | The taint key to be applied to a node | +| pools.{index}.startup-taints.{index}.value | | The taint value corresponding to the taint key | +| pools.{index}.startup-taints.{index}.effect | One of: `NoSchedule`, `PreferNoSchedule`, `NoExecute` | Effect defines the effects of Taint | | autoscaler-config.scale-down-disabled | | Forbid cluster autoscaler to scale down the cluster, defaults to false | | autoscaler-config.scale-down-delay-after-add | | How long after scale up the scale down evaluation resumes | | autoscaler-config.estimator | One of: `unknown_estimator`, `binpacking` | Type of resource estimator to be used in scale up | @@ -1014,6 +1021,13 @@ scw k8s pool create [arg=value ...] | root-volume-size | | System volume disk size | | public-ip-disabled | | Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway | | security-group-id | | Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone | +| labels.{key} | | Kubernetes labels applied and reconciled on the nodes | +| taints.{index}.key | | The taint key to be applied to a node | +| taints.{index}.value | | The taint value corresponding to the taint key | +| taints.{index}.effect | One of: `NoSchedule`, `PreferNoSchedule`, `NoExecute` | Effect defines the effects of Taint | +| startup-taints.{index}.key | | The taint key to be applied to a node | +| startup-taints.{index}.value | | The taint value corresponding to the taint key | +| startup-taints.{index}.effect | One of: `NoSchedule`, `PreferNoSchedule`, `NoExecute` | Effect defines the effects of Taint | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/go.mod b/go.mod index 09f435c3c3..149ab35eed 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/moby/buildkit v0.27.1 github.com/moby/go-archive v0.2.0 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260216140602-016f04e8505d + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260218175729-a92ec8c9a75c github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 4fde2202be..cb0a768260 100644 --- a/go.sum +++ b/go.sum @@ -468,8 +468,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260216140602-016f04e8505d h1:0LuW1N/w+ordwEY6kfPlyPbIp2R0NQ319O90SUBVnX0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260216140602-016f04e8505d/go.mod h1:Ysemk+aTe1WHMoiLx50yZHpMS+v4vYljt+QbCMAKsVA= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260218175729-a92ec8c9a75c h1:ijHD/7UQW2F0Ptj0+KREl2yFwV5iU1xTXd4YEQCr60w= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260218175729-a92ec8c9a75c/go.mod h1:Ysemk+aTe1WHMoiLx50yZHpMS+v4vYljt+QbCMAKsVA= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.9.1 h1:nZZaNz4DiERIQguNy0cL5qTdn9lR8XKHf4RUyG1Sx3g= diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index 1998bb00be..fed8a5ad88 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -487,6 +487,65 @@ func k8sClusterCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "pools.{index}.labels.{key}", + Short: `Kubernetes labels applied and reconciled on the nodes`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "pools.{index}.taints.{index}.key", + Short: `The taint key to be applied to a node`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "pools.{index}.taints.{index}.value", + Short: `The taint value corresponding to the taint key`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "pools.{index}.taints.{index}.effect", + Short: `Effect defines the effects of Taint`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{ + "NoSchedule", + "PreferNoSchedule", + "NoExecute", + }, + }, + { + Name: "pools.{index}.startup-taints.{index}.key", + Short: `The taint key to be applied to a node`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "pools.{index}.startup-taints.{index}.value", + Short: `The taint value corresponding to the taint key`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "pools.{index}.startup-taints.{index}.effect", + Short: `Effect defines the effects of Taint`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{ + "NoSchedule", + "PreferNoSchedule", + "NoExecute", + }, + }, { Name: "autoscaler-config.scale-down-disabled", Short: `Forbid cluster autoscaler to scale down the cluster, defaults to false`, @@ -1836,6 +1895,65 @@ func k8sPoolCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "labels.{key}", + Short: `Kubernetes labels applied and reconciled on the nodes`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "taints.{index}.key", + Short: `The taint key to be applied to a node`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "taints.{index}.value", + Short: `The taint value corresponding to the taint key`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "taints.{index}.effect", + Short: `Effect defines the effects of Taint`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{ + "NoSchedule", + "PreferNoSchedule", + "NoExecute", + }, + }, + { + Name: "startup-taints.{index}.key", + Short: `The taint key to be applied to a node`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "startup-taints.{index}.value", + Short: `The taint value corresponding to the taint key`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "startup-taints.{index}.effect", + Short: `Effect defines the effects of Taint`, + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{ + "NoSchedule", + "PreferNoSchedule", + "NoExecute", + }, + }, core.RegionArgSpec( scw.RegionFrPar, scw.RegionNlAms,