-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cluster- updating cmd files for documentation
The description and examples are updated for the airshipctl commands, which will be inturn used for generating documentation. Please ignore the .md file changes in this PS. They are added for zuul gates to pass. Here is the PS with generated documention files https://review.opendev.org/c/airship/airshipctl/+/789250 Relates-To: #280 Change-Id: I7c088528842ff859f502d4484ff9a3847ebb1177
- Loading branch information
1 parent
ec3840a
commit d13d15f
Showing
18 changed files
with
177 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 18 additions & 20 deletions
38
...heckexpiration/testdata/TestCheckExpirationGoldenOutput/check-expiration-with-help.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
Displays a list of certificate expirations from both the management and | ||
workload clusters, or in a self-managed cluster. Checks for TLS Secrets, | ||
kubeconf secrets (which gets created while creating the workload cluster) and | ||
also the node certificates present inside /etc/kubernetes/pki directory for | ||
each node | ||
Displays a list of certificate along with expirations from both the management and workload clusters, or in a | ||
self-managed cluster. Checks for TLS Secrets, kubeconf secrets (which gets created while creating the | ||
workload cluster) and also the node certificates present inside /etc/kubernetes/pki directory for each node. | ||
|
||
Usage: | ||
check-certificate-expiration [flags] | ||
|
||
Examples: | ||
|
||
# To display all the expiring entities in the cluster | ||
airshipctl cluster check-certificate-expiration --kubeconfig testconfig | ||
To display all the expiring entities in the cluster | ||
# airshipctl cluster check-certificate-expiration --kubeconfig testconfig | ||
|
||
# To display the entities whose expiration is within threshold of 30 days | ||
airshipctl cluster check-certificate-expiration -t 30 --kubeconfig testconfig | ||
To display the entities whose expiration is within threshold of 30 days | ||
# airshipctl cluster check-certificate-expiration -t 30 --kubeconfig testconfig | ||
|
||
# To output the contents to json (default operation) | ||
airshipctl cluster check-certificate-expiration -o json --kubeconfig testconfig | ||
To output the contents to json (default operation) | ||
# airshipctl cluster check-certificate-expiration -o json --kubeconfig testconfig | ||
or | ||
airshipctl cluster check-certificate-expiration --kubeconfig testconfig | ||
# airshipctl cluster check-certificate-expiration --kubeconfig testconfig | ||
|
||
# To output the contents to yaml | ||
airshipctl cluster check-certificate-expiration -o yaml --kubeconfig testconfig | ||
To output the contents to yaml | ||
# airshipctl cluster check-certificate-expiration -o yaml --kubeconfig testconfig | ||
|
||
# To output the contents whose expiration is within 30 days to yaml | ||
airshipctl cluster check-certificate-expiration -t 30 -o yaml --kubeconfig testconfig | ||
To output the contents whose expiration is within 30 days to yaml | ||
# airshipctl cluster check-certificate-expiration -t 30 -o yaml --kubeconfig testconfig | ||
|
||
|
||
Flags: | ||
-h, --help help for check-certificate-expiration | ||
--kubeconfig string Path to kubeconfig associated with cluster being managed | ||
--kubecontext string Kubeconfig context to be used | ||
-o, --output string Convert output to yaml or json (default "json") | ||
-t, --threshold int The max expiration threshold in days before a certificate is expiring. Displays all the certificates by default (default -1) | ||
--kubeconfig string path to kubeconfig associated with cluster being managed | ||
--kubecontext string kubeconfig context to be used | ||
-o, --output string convert output to yaml or json (default "json") | ||
-t, --threshold int the max expiration threshold in days before a certificate is expiring. Displays all the certificates by default (default -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
cmd/cluster/resetsatoken/testdata/TestResetTokenGoldenOutput/reset-with-help.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
Use to reset/rotate the Service Account(SA) tokens and additionally restart the | ||
corresponding pods to get the latest token data reflected in the pod spec | ||
Reset/rotate the Service Account(SA) tokens and additionally restart the corresponding pods to get the latest | ||
token data reflected in the pod spec. | ||
|
||
Secret-namespace is a mandatory field and secret-name is optional. If secret- | ||
name is not given, all the SA tokens in that particular namespace is considered, | ||
else only that particular input secret-name | ||
Secret-namespace is a mandatory flag and secret-name is optional. If secret-name is not given, all the SA tokens | ||
in that particular namespace is considered, else only that particular input secret-name. | ||
|
||
Usage: | ||
rotate-sa-token [flags] | ||
|
||
Examples: | ||
|
||
# To rotate a particular SA token | ||
airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p | ||
To rotate a particular SA token | ||
# airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p | ||
|
||
# To rotate all the SA tokens in cert-manager namespace | ||
airshipctl cluster rotate-sa-token -n cert-manager | ||
To rotate all the SA tokens in cert-manager namespace | ||
# airshipctl cluster rotate-sa-token -n cert-manager | ||
|
||
|
||
Flags: | ||
-h, --help help for rotate-sa-token | ||
--kubeconfig string Path to kubeconfig associated with cluster being managed | ||
--kubeconfig string path to kubeconfig associated with cluster being managed | ||
-s, --secret-name string name of the secret containing Service Account Token | ||
-n, --secret-namespace string namespace of the Service Account Token |
10 changes: 5 additions & 5 deletions
10
cmd/cluster/testdata/TestNewClusterCommandGoldenOutput/cluster-cmd-with-help.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 11 additions & 8 deletions
19
...tdata/TestNewKubeConfigCommandCmdGoldenOutput/cluster-get-kubeconfig-cmd-with-help.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
cmd/cluster/testdata/TestNewListCommandGoldenOutput/cluster-list-cmd-with-help.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
Retrieve the list of defined clusters | ||
|
||
Retrieve and list the defined clusters in the table form or display just the name as specified. | ||
|
||
Usage: | ||
list [flags] | ||
|
||
Examples: | ||
# Retrieve cluster list | ||
airshipctl cluster list --airshipconf /tmp/airconfig | ||
airshipctl cluster list -o table | ||
airshipctl cluster list -o name | ||
|
||
Retrieve list of clusters | ||
# airshipctl cluster list --airshipconf /tmp/airconfig | ||
# airshipctl cluster list -o table | ||
# airshipctl cluster list -o name | ||
|
||
|
||
Flags: | ||
-h, --help help for list | ||
-o, --output string 'table' and 'name' are available output formats (default "name") | ||
-o, --output string output formats. Supported options are 'table' and 'name' (default "name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.