mirror of
https://github.com/rancher/rke.git
synced 2025-08-11 19:53:02 +00:00
Merge pull request #1540 from superseb/certsshagent
Make commonflags work with rke cert commands
This commit is contained in:
commit
e21da55270
22
cmd/cert.go
22
cmd/cert.go
@ -15,15 +15,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func CertificateCommand() cli.Command {
|
func CertificateCommand() cli.Command {
|
||||||
return cli.Command{
|
rotateFlags := []cli.Flag{
|
||||||
Name: "cert",
|
|
||||||
Usage: "Certificates management for RKE cluster",
|
|
||||||
Subcommands: cli.Commands{
|
|
||||||
cli.Command{
|
|
||||||
Name: "rotate",
|
|
||||||
Usage: "Rotate RKE cluster certificates",
|
|
||||||
Action: rotateRKECertificatesFromCli,
|
|
||||||
Flags: []cli.Flag{
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config",
|
Name: "config",
|
||||||
Usage: "Specify an alternate cluster YAML file",
|
Usage: "Specify an alternate cluster YAML file",
|
||||||
@ -45,7 +37,17 @@ func CertificateCommand() cli.Command {
|
|||||||
Name: "rotate-ca",
|
Name: "rotate-ca",
|
||||||
Usage: "Rotate all certificates including CA certs",
|
Usage: "Rotate all certificates including CA certs",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
|
rotateFlags = append(rotateFlags, commonFlags...)
|
||||||
|
return cli.Command{
|
||||||
|
Name: "cert",
|
||||||
|
Usage: "Certificates management for RKE cluster",
|
||||||
|
Subcommands: cli.Commands{
|
||||||
|
cli.Command{
|
||||||
|
Name: "rotate",
|
||||||
|
Usage: "Rotate RKE cluster certificates",
|
||||||
|
Action: rotateRKECertificatesFromCli,
|
||||||
|
Flags: rotateFlags,
|
||||||
},
|
},
|
||||||
cli.Command{
|
cli.Command{
|
||||||
Name: "generate-csr",
|
Name: "generate-csr",
|
||||||
|
Loading…
Reference in New Issue
Block a user