Skip to content

Commit a3a693a

Browse files
authored
SKE Credentials Rotation: deprecate old commands (#191)
* deprecate describe and rotate commands * improve deprecation messages, add docs
1 parent f6728a7 commit a3a693a

File tree

6 files changed

+14
-82
lines changed

6 files changed

+14
-82
lines changed

docs/stackit_ske_credentials.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ stackit ske credentials [flags]
2929

3030
* [stackit ske](./stackit_ske.md) - Provides functionality for SKE
3131
* [stackit ske credentials complete-rotation](./stackit_ske_credentials_complete-rotation.md) - Completes the rotation of the credentials associated to a SKE cluster
32-
* [stackit ske credentials describe](./stackit_ske_credentials_describe.md) - Shows details of the credentials associated to a SKE cluster
33-
* [stackit ske credentials rotate](./stackit_ske_credentials_rotate.md) - Rotates credentials associated to a SKE cluster
3432
* [stackit ske credentials start-rotation](./stackit_ske_credentials_start-rotation.md) - Starts the rotation of the credentials associated to a SKE cluster
3533

docs/stackit_ske_credentials_describe.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

docs/stackit_ske_credentials_rotate.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/stackit_ske_kubeconfig_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ stackit ske kubeconfig create CLUSTER_NAME [flags]
3535

3636
```
3737
-e, --expiration string Expiration time for the kubeconfig in seconds(s), minutes(m), hours(h), days(d) or months(M). Example: 30d. By default, expiration time is 1h
38-
--filepath string Path to create the kubeconfig file. By default, the kubeconfig is created in the .kube folder, in the user's home directory.
38+
--filepath string Path to create the kubeconfig file. By default, the kubeconfig is created as 'config' in the .kube folder, in the user's home directory.
3939
-h, --help Help for "stackit ske kubeconfig create"
4040
```
4141

internal/cmd/ske/credentials/describe/describe.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ func NewCmd() *cobra.Command {
3232
Short: "Shows details of the credentials associated to a SKE cluster",
3333
Long: "Shows details of the credentials associated to a STACKIT Kubernetes Engine (SKE) cluster",
3434
Args: args.SingleArg(clusterNameArg, nil),
35+
Deprecated: fmt.Sprintf("%s\n%s\n%s\n%s\n",
36+
"and will be removed in a future release.",
37+
"Please use the following command to obtain a kubeconfig file instead:",
38+
" $ stackit ske kubeconfig create my-cluster",
39+
"For more information, visit: https://docs.stackit.cloud/stackit/en/how-to-rotate-ske-credentials-200016334.html",
40+
),
3541
Example: examples.Build(
3642
examples.NewExample(
3743
`Get details of the credentials associated to the SKE cluster with name "my-cluster"`,

internal/cmd/ske/credentials/rotate/rotate.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ func NewCmd() *cobra.Command {
3232
Short: "Rotates credentials associated to a SKE cluster",
3333
Long: "Rotates credentials associated to a STACKIT Kubernetes Engine (SKE) cluster. The old credentials will be invalid after the operation.",
3434
Args: args.SingleArg(clusterNameArg, nil),
35+
Deprecated: fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n",
36+
"and will be removed in a future release.",
37+
"Please use the 2-step credential rotation flow instead, by running the commands:",
38+
" $ stackit ske credentials start-rotation my-cluster",
39+
" $ stackit ske credentials complete-rotation my-cluster",
40+
"For more information, visit: https://docs.stackit.cloud/stackit/en/how-to-rotate-ske-credentials-200016334.html",
41+
),
3542
Example: examples.Build(
3643
examples.NewExample(
3744
`Rotate credentials associated to the SKE cluster with name "my-cluster"`,

0 commit comments

Comments
 (0)