Skip to content

Commit 048db2a

Browse files
authored
feat(k8s): support setting PodCidr, ServiceCidr, and ServiceDNSIP dur… (#4939)
1 parent b95b2e9 commit 048db2a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ ARGS:
6262
[open-id-connect-config.required-claim.{index}] Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value
6363
[apiserver-cert-sans.{index}] Additional Subject Alternative Names for the Kubernetes API server certificate
6464
[private-network-id] Private network ID for internal cluster communication (cannot be changed later). For Kapsule clusters, if none is provided, a private network will be created
65+
[pod-cidr] Subnet used for the Pod CIDR (cannot be changed later)
66+
[service-cidr] Subnet used for the Service CIDR (cannot be changed later)
67+
[service-dns-ip] IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10
6568
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
6669
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
6770

docs/commands/k8s.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ scw k8s cluster create [arg=value ...]
208208
| open-id-connect-config.required-claim.{index} | | Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value |
209209
| apiserver-cert-sans.{index} | | Additional Subject Alternative Names for the Kubernetes API server certificate |
210210
| private-network-id | | Private network ID for internal cluster communication (cannot be changed later). For Kapsule clusters, if none is provided, a private network will be created |
211+
| pod-cidr | | Subnet used for the Pod CIDR (cannot be changed later) |
212+
| service-cidr | | Subnet used for the Service CIDR (cannot be changed later) |
213+
| service-dns-ip | | IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10 |
211214
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
212215
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
213216

internal/namespaces/k8s/v1/k8s_cli.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,27 @@ func k8sClusterCreate() *core.Command {
677677
Deprecated: false,
678678
Positional: false,
679679
},
680+
{
681+
Name: "pod-cidr",
682+
Short: `Subnet used for the Pod CIDR (cannot be changed later)`,
683+
Required: false,
684+
Deprecated: false,
685+
Positional: false,
686+
},
687+
{
688+
Name: "service-cidr",
689+
Short: `Subnet used for the Service CIDR (cannot be changed later)`,
690+
Required: false,
691+
Deprecated: false,
692+
Positional: false,
693+
},
694+
{
695+
Name: "service-dns-ip",
696+
Short: `IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10`,
697+
Required: false,
698+
Deprecated: false,
699+
Positional: false,
700+
},
680701
core.OrganizationIDArgSpec(),
681702
core.RegionArgSpec(
682703
scw.RegionFrPar,

0 commit comments

Comments
 (0)