Skip to content

feat(k8s): add projects #1341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ EXAMPLES:
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

ARGS:
[project-id] The project ID where the cluster will be created
name The name of the cluster
[description] The description of the cluster
[tags.{index}] The tags associated with the cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ EXAMPLES:
scw k8s cluster list region=fr-par name=cluster1

ARGS:
[project-id] The project ID on which to filter the returned clusters
[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)
[name] The name on which to filter the returned clusters
[status] The status on which to filter the returned clusters (unknown | creating | ready | deleting | deleted | updating | locked | pool_required)
Expand Down
14 changes: 13 additions & 1 deletion internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ func k8sClusterList() *core.Command {
Verb: "list",
ArgsType: reflect.TypeOf(k8s.ListClustersRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "project-id",
Short: `The project ID on which to filter the returned clusters`,
Required: false,
Positional: false,
},
{
Name: "order-by",
Short: `The sort order of the returned clusters`,
Expand Down Expand Up @@ -184,7 +190,7 @@ func k8sClusterList() *core.Command {
FieldName: "Region",
},
{
FieldName: "OrganizationID",
FieldName: "ProjectID",
},
{
FieldName: "Tags",
Expand Down Expand Up @@ -217,6 +223,12 @@ func k8sClusterCreate() *core.Command {
Verb: "create",
ArgsType: reflect.TypeOf(k8s.CreateClusterRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "project-id",
Short: `The project ID where the cluster will be created`,
Required: false,
Positional: false,
},
{
Name: "name",
Short: `The name of the cluster`,
Expand Down