Skip to content

Commit 6ed04ac

Browse files
authored
docs(k8s): adjust examples (#2725)
1 parent 15bd3e6 commit 6ed04ac

File tree

8 files changed

+39
-39
lines changed

8 files changed

+39
-39
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw k8s cluster create [arg=value ...]
77

88
EXAMPLES:
9-
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.17.4 and with a pool named default composed of 3 DEV1-M
10-
scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
9+
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.24.7 and with a pool named default composed of 3 DEV1-M
10+
scw k8s cluster create name=foo version=1.24.7 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
1111

12-
Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.17.4 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
13-
scw k8s cluster create name=bar version=1.17.4 tags.0=tag1 tags.1=tag2 cni=cilium pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default
12+
Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.24.7 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
13+
scw k8s cluster create name=bar version=1.24.7 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default
1414

1515
ARGS:
1616
[project-id] Project ID to use. If none is passed the default project ID will be used

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw k8s cluster upgrade <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
9-
Upgrade a given cluster to Kubernetes version 1.17.4 (without upgrading the pools)
10-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4
9+
Upgrade a given cluster to Kubernetes version 1.24.7 (without upgrading the pools)
10+
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7
1111

12-
Upgrade a given cluster to Kubernetes version 1.17.4 (and upgrade the pools)
13-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4 upgrade-pools=true
12+
Upgrade a given cluster to Kubernetes version 1.24.7 (and upgrade the pools)
13+
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7 upgrade-pools=true
1414

1515
ARGS:
1616
cluster-id The ID of the cluster to upgrade

cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ USAGE:
66
scw k8s pool upgrade <pool-id ...> [arg=value ...]
77

88
EXAMPLES:
9-
Upgrade a given pool to the Kubernetes version 1.17.4
10-
scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.17.4
9+
Upgrade a given pool to the Kubernetes version 1.24.7
10+
scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.24.7
1111

1212
ARGS:
1313
pool-id The ID of the pool to upgrade

cmd/scw/testdata/test-all-usage-k8s-version-get-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ USAGE:
66
scw k8s version get <version-name ...> [arg=value ...]
77

88
EXAMPLES:
9-
Get the Kubernetes version 1.18.0
10-
scw k8s version get 1.18.0
9+
Get the Kubernetes version 1.24.7
10+
scw k8s version get 1.24.7
1111

1212
ARGS:
1313
version-name The requested version name

docs/commands/k8s.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ scw k8s cluster create [arg=value ...]
114114
**Examples:**
115115

116116

117-
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.17.4 and with a pool named default composed of 3 DEV1-M
117+
Create a Kubernetes cluster named foo with cilium as CNI, in version 1.24.7 and with a pool named default composed of 3 DEV1-M
118118
```
119-
scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
119+
scw k8s cluster create name=foo version=1.24.7 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
120120
```
121121

122-
Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.17.4 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
122+
Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.24.7 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)
123123
```
124-
scw k8s cluster create name=bar version=1.17.4 tags.0=tag1 tags.1=tag2 cni=cilium pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default
124+
scw k8s cluster create name=bar version=1.24.7 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default
125125
```
126126

127127

@@ -380,14 +380,14 @@ scw k8s cluster upgrade <cluster-id ...> [arg=value ...]
380380
**Examples:**
381381

382382

383-
Upgrade a given cluster to Kubernetes version 1.17.4 (without upgrading the pools)
383+
Upgrade a given cluster to Kubernetes version 1.24.7 (without upgrading the pools)
384384
```
385-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4
385+
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7
386386
```
387387

388-
Upgrade a given cluster to Kubernetes version 1.17.4 (and upgrade the pools)
388+
Upgrade a given cluster to Kubernetes version 1.24.7 (and upgrade the pools)
389389
```
390-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4 upgrade-pools=true
390+
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7 upgrade-pools=true
391391
```
392392

393393

@@ -979,9 +979,9 @@ scw k8s pool upgrade <pool-id ...> [arg=value ...]
979979
**Examples:**
980980

981981

982-
Upgrade a given pool to the Kubernetes version 1.17.4
982+
Upgrade a given pool to the Kubernetes version 1.24.7
983983
```
984-
scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.17.4
984+
scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.24.7
985985
```
986986

987987

@@ -1049,9 +1049,9 @@ scw k8s version get <version-name ...> [arg=value ...]
10491049
**Examples:**
10501050

10511051

1052-
Get the Kubernetes version 1.18.0
1052+
Get the Kubernetes version 1.24.7
10531053
```
1054-
scw k8s version get 1.18.0
1054+
scw k8s version get 1.24.7
10551055
```
10561056

10571057

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
1919
github.com/mattn/go-colorable v0.1.13
2020
github.com/mattn/go-isatty v0.0.17
21-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230118161550-110ff1a95149
21+
github.com/scaleway/scaleway-sdk-go v0.0.0-20230119101533-5be32c0549bd
2222
github.com/spf13/cobra v1.6.1
2323
github.com/spf13/pflag v1.0.5
2424
github.com/stretchr/testify v1.8.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
7272
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7373
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7474
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
75-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230118161550-110ff1a95149 h1:DXexrdueftqgJerI7MO+GHUpSuVFnlKyjCus91EKC4g=
76-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12.0.20230118161550-110ff1a95149/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
75+
github.com/scaleway/scaleway-sdk-go v0.0.0-20230119101533-5be32c0549bd h1:EKWfS3VZh7ZMsySBBT3XLRwosxg/u4n0/MGjIDx/q88=
76+
github.com/scaleway/scaleway-sdk-go v0.0.0-20230119101533-5be32c0549bd/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7777
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7878
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7979
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=

internal/namespaces/k8s/v1/k8s_cli.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,12 @@ func k8sClusterCreate() *core.Command {
597597
},
598598
Examples: []*core.Example{
599599
{
600-
Short: "Create a Kubernetes cluster named foo with cilium as CNI, in version 1.17.4 and with a pool named default composed of 3 DEV1-M",
601-
Raw: `scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default`,
600+
Short: "Create a Kubernetes cluster named foo with cilium as CNI, in version 1.24.7 and with a pool named default composed of 3 DEV1-M",
601+
Raw: `scw k8s cluster create name=foo version=1.24.7 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default`,
602602
},
603603
{
604-
Short: "Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.17.4 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)",
605-
Raw: `scw k8s cluster create name=bar version=1.17.4 tags.0=tag1 tags.1=tag2 cni=cilium pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default`,
604+
Short: "Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.24.7 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)",
605+
Raw: `scw k8s cluster create name=bar version=1.24.7 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default`,
606606
},
607607
},
608608
}
@@ -970,12 +970,12 @@ func k8sClusterUpgrade() *core.Command {
970970
},
971971
Examples: []*core.Example{
972972
{
973-
Short: "Upgrade a given cluster to Kubernetes version 1.17.4 (without upgrading the pools)",
974-
Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4`,
973+
Short: "Upgrade a given cluster to Kubernetes version 1.24.7 (without upgrading the pools)",
974+
Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7`,
975975
},
976976
{
977-
Short: "Upgrade a given cluster to Kubernetes version 1.17.4 (and upgrade the pools)",
978-
Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.17.4 upgrade-pools=true`,
977+
Short: "Upgrade a given cluster to Kubernetes version 1.24.7 (and upgrade the pools)",
978+
Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.24.7 upgrade-pools=true`,
979979
},
980980
},
981981
}
@@ -1441,8 +1441,8 @@ func k8sPoolUpgrade() *core.Command {
14411441
},
14421442
Examples: []*core.Example{
14431443
{
1444-
Short: "Upgrade a given pool to the Kubernetes version 1.17.4",
1445-
Raw: `scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.17.4`,
1444+
Short: "Upgrade a given pool to the Kubernetes version 1.24.7",
1445+
Raw: `scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.24.7`,
14461446
},
14471447
},
14481448
}
@@ -1951,8 +1951,8 @@ func k8sVersionGet() *core.Command {
19511951
},
19521952
Examples: []*core.Example{
19531953
{
1954-
Short: "Get the Kubernetes version 1.18.0",
1955-
Raw: `scw k8s version get 1.18.0`,
1954+
Short: "Get the Kubernetes version 1.24.7",
1955+
Raw: `scw k8s version get 1.24.7`,
19561956
},
19571957
},
19581958
}

0 commit comments

Comments
 (0)