Skip to content

Commit e3940fa

Browse files
feat(k8s): add projects (#1341)
Co-authored-by: Rémy Léone <[email protected]>
1 parent ab914e2 commit e3940fa

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ EXAMPLES:
1313
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
1414

1515
ARGS:
16+
[project-id] The project ID where the cluster will be created
1617
name The name of the cluster
1718
[description] The description of the cluster
1819
[tags.{index}] The tags associated with the cluster

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

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ EXAMPLES:
1616
scw k8s cluster list region=fr-par name=cluster1
1717

1818
ARGS:
19+
[project-id] The project ID on which to filter the returned clusters
1920
[order-by] The sort order of the returned clusters (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc | status_asc | status_desc | version_asc | version_desc)
2021
[name] The name on which to filter the returned clusters
2122
[status] The status on which to filter the returned clusters (unknown | creating | ready | deleting | deleted | updating | locked | pool_required)

internal/namespaces/k8s/v1/k8s_cli.go

+13-1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ func k8sClusterList() *core.Command {
113113
Verb: "list",
114114
ArgsType: reflect.TypeOf(k8s.ListClustersRequest{}),
115115
ArgSpecs: core.ArgSpecs{
116+
{
117+
Name: "project-id",
118+
Short: `The project ID on which to filter the returned clusters`,
119+
Required: false,
120+
Positional: false,
121+
},
116122
{
117123
Name: "order-by",
118124
Short: `The sort order of the returned clusters`,
@@ -184,7 +190,7 @@ func k8sClusterList() *core.Command {
184190
FieldName: "Region",
185191
},
186192
{
187-
FieldName: "OrganizationID",
193+
FieldName: "ProjectID",
188194
},
189195
{
190196
FieldName: "Tags",
@@ -217,6 +223,12 @@ func k8sClusterCreate() *core.Command {
217223
Verb: "create",
218224
ArgsType: reflect.TypeOf(k8s.CreateClusterRequest{}),
219225
ArgSpecs: core.ArgSpecs{
226+
{
227+
Name: "project-id",
228+
Short: `The project ID where the cluster will be created`,
229+
Required: false,
230+
Positional: false,
231+
},
220232
{
221233
Name: "name",
222234
Short: `The name of the cluster`,

0 commit comments

Comments
 (0)