Skip to content

Commit 709d7cc

Browse files
docs(k8s): fix examples for pool (#1976)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 9cadd9c commit 709d7cc

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ USAGE:
77

88
EXAMPLES:
99
Create a pool named bar with 2 DEV1-XL on a given cluster
10-
scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2
10+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2
1111

1212
Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster
13-
scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd
13+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd
1414

1515
Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster
16-
scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group
16+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group
1717

1818
ARGS:
1919
cluster-id The ID of the cluster in which the pool will be created

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ USAGE:
77

88
EXAMPLES:
99
List all pools for a given cluster
10-
scw k8s pool list 11111111-1111-1111-111111111111
10+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111
1111

1212
List all scaling pools for a given cluster
13-
scw k8s pool list 11111111-1111-1111-111111111111 status=scaling
13+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling
1414

1515
List all pools for a given cluster that contain the word foo in the pool name
16-
scw k8s pool list 11111111-1111-1111-111111111111 name=foo
16+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo
1717

1818
List all pools for a given cluster and order them by ascending creation date
19-
scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc
19+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc
2020

2121
ARGS:
2222
cluster-id The ID of the cluster from which the pools will be listed from

docs/commands/k8s.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -736,17 +736,17 @@ scw k8s pool create [arg=value ...]
736736

737737
Create a pool named bar with 2 DEV1-XL on a given cluster
738738
```
739-
scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2
739+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2
740740
```
741741

742742
Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster
743743
```
744-
scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd
744+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd
745745
```
746746

747747
Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster
748748
```
749-
scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group
749+
scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group
750750
```
751751

752752

@@ -839,22 +839,22 @@ scw k8s pool list [arg=value ...]
839839

840840
List all pools for a given cluster
841841
```
842-
scw k8s pool list 11111111-1111-1111-111111111111
842+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111
843843
```
844844

845845
List all scaling pools for a given cluster
846846
```
847-
scw k8s pool list 11111111-1111-1111-111111111111 status=scaling
847+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling
848848
```
849849

850850
List all pools for a given cluster that contain the word foo in the pool name
851851
```
852-
scw k8s pool list 11111111-1111-1111-111111111111 name=foo
852+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo
853853
```
854854

855855
List all pools for a given cluster and order them by ascending creation date
856856
```
857-
scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc
857+
scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc
858858
```
859859

860860

internal/namespaces/k8s/v1/k8s_cli.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -1108,19 +1108,19 @@ func k8sPoolList() *core.Command {
11081108
Examples: []*core.Example{
11091109
{
11101110
Short: "List all pools for a given cluster",
1111-
Raw: `scw k8s pool list 11111111-1111-1111-111111111111`,
1111+
Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111`,
11121112
},
11131113
{
11141114
Short: "List all scaling pools for a given cluster",
1115-
Raw: `scw k8s pool list 11111111-1111-1111-111111111111 status=scaling`,
1115+
Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling`,
11161116
},
11171117
{
11181118
Short: "List all pools for a given cluster that contain the word foo in the pool name",
1119-
Raw: `scw k8s pool list 11111111-1111-1111-111111111111 name=foo`,
1119+
Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo`,
11201120
},
11211121
{
11221122
Short: "List all pools for a given cluster and order them by ascending creation date",
1123-
Raw: `scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc`,
1123+
Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc`,
11241124
},
11251125
},
11261126
View: &core.View{Fields: []*core.ViewField{
@@ -1312,15 +1312,15 @@ func k8sPoolCreate() *core.Command {
13121312
Examples: []*core.Example{
13131313
{
13141314
Short: "Create a pool named bar with 2 DEV1-XL on a given cluster",
1315-
Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`,
1315+
Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`,
13161316
},
13171317
{
13181318
Short: "Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster",
1319-
Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd`,
1319+
Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd`,
13201320
},
13211321
{
13221322
Short: "Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster",
1323-
Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group`,
1323+
Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group`,
13241324
},
13251325
},
13261326
}

0 commit comments

Comments
 (0)