kubekey/cmd/renew_cert.go
24sama 88c26e54a1 dev-v2.0.0: add new api version and adjust project structure
Signed-off-by: 24sama <leo@kubesphere.io>
2021-11-01 18:15:16 +08:00

26 lines
605 B
Go

package cmd
import (
common2 "github.com/kubesphere/kubekey/pkg/common"
"github.com/kubesphere/kubekey/pkg/pipelines"
"github.com/spf13/cobra"
)
var renewClusterCertsCmd = &cobra.Command{
Use: "renew",
Short: "renew a cluster certs",
RunE: func(cmd *cobra.Command, args []string) error {
arg := common2.Argument{
FilePath: opt.ClusterCfgFile,
Debug: opt.Verbose,
}
return pipelines.RenewCerts(arg)
},
}
func init() {
certsCmd.AddCommand(renewClusterCertsCmd)
renewClusterCertsCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
}