kubekey/cmd/renew_cert.go
Forest-L 5f33244f6a Add cluster certs renew
Signed-off-by: Forest-L <lilin@yunify.com>
2020-11-16 22:44:15 +08:00

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")
}