mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
23 lines
565 B
Go
23 lines
565 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/kubesphere/kubekey/pkg/cert"
|
|
"github.com/kubesphere/kubekey/pkg/util"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var renewClusterCertsCmd = &cobra.Command{
|
|
Use: "renew",
|
|
Short: "renew a cluster certs",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
logger := util.InitLogger(opt.Verbose)
|
|
cert.RenewClusterCerts(opt.ClusterCfgFile, logger, opt.Verbose)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
certsCmd.AddCommand(renewClusterCertsCmd)
|
|
|
|
renewClusterCertsCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
|
|
}
|