mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
Fix #1147: Error in the script used to automatically update certificate in cluster.
Signed-off-by: cumirror <jacksontong@yunify.com>
This commit is contained in:
parent
37dd9a4350
commit
546f6ad897
|
|
@ -17,13 +17,17 @@
|
|||
package certs
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
versionutil "k8s.io/apimachinery/pkg/util/version"
|
||||
|
||||
"github.com/kubesphere/kubekey/pkg/certs/templates"
|
||||
"github.com/kubesphere/kubekey/pkg/common"
|
||||
"github.com/kubesphere/kubekey/pkg/core/action"
|
||||
"github.com/kubesphere/kubekey/pkg/core/prepare"
|
||||
"github.com/kubesphere/kubekey/pkg/core/task"
|
||||
"github.com/kubesphere/kubekey/pkg/core/util"
|
||||
"github.com/kubesphere/kubekey/pkg/kubernetes"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type CheckCertsModule struct {
|
||||
|
|
@ -136,6 +140,10 @@ func (a *AutoRenewCertsModule) Init() {
|
|||
Action: &action.Template{
|
||||
Template: templates.K8sCertsRenewScript,
|
||||
Dst: filepath.Join("/usr/local/bin/kube-scripts/", templates.K8sCertsRenewScript.Name()),
|
||||
Data: util.Data{
|
||||
"IsDocker": a.KubeConf.Cluster.Kubernetes.ContainerManager == common.Docker,
|
||||
"IsKubeadmAlphaCerts": versionutil.MustParseSemantic(a.KubeConf.Cluster.Kubernetes.Version).LessThan(versionutil.MustParseGeneric("v1.20.0")),
|
||||
},
|
||||
},
|
||||
Parallel: true,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue