kubekey/cmd/renew_cert.go
pixiake 5e900b9210 Feature: Support for deploying k3s cluster
Signed-off-by: pixiake <guofeng@yunify.com>
2021-02-23 23:08:32 +08:00

23 lines
579 B
Go

package cmd
import (
"github.com/kubesphere/kubekey/pkg/cluster/certs"
"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)
_ = certs.RenewClusterCerts(opt.ClusterCfgFile, logger, opt.Verbose)
},
}
func init() {
certsCmd.AddCommand(renewClusterCertsCmd)
renewClusterCertsCmd.Flags().StringVarP(&opt.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
}