Skip to content

Commit

Permalink
Update k8s dependency to latest version(1.25.1) for karmadactl
Browse files Browse the repository at this point in the history
Signed-off-by: jwcesign <jiangwei115@huawei.com>
  • Loading branch information
jwcesign committed Sep 20, 2022
1 parent 92508b3 commit c0538b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 7 additions & 3 deletions pkg/karmadactl/cmdinit/kubernetes/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ var (
defaultKubeConfig = filepath.Join(homeDir(), ".kube", "config")

defaultEtcdImage = "etcd:3.5.3-0"
defaultKubeAPIServerImage = "kube-apiserver:v1.24.2"
defaultKubeControllerManagerImage = "kube-controller-manager:v1.24.2"
defaultKubeAPIServerImage = "kube-apiserver:v1.25.1"
defaultKubeControllerManagerImage = "kube-controller-manager:v1.25.1"
)

const (
Expand Down Expand Up @@ -176,6 +176,10 @@ func (i *CommandInitOption) Complete() error {
return err
}
}
// Recreate the KarmadaDataPath
if err := os.MkdirAll(i.KarmadaDataPath, 0755); err != nil {
return err
}

return nil
}
Expand Down Expand Up @@ -248,7 +252,7 @@ func (i *CommandInitOption) genCerts() error {
func (i *CommandInitOption) prepareCRD() error {
if strings.HasPrefix(i.CRDs, "http") {
filename := i.KarmadaDataPath + "/" + path.Base(i.CRDs)
klog.Infoln("download crds file name:", filename)
klog.Infof("download crds file:%s", i.CRDs)
if err := utils.DownloadFile(i.CRDs, filename); err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion pkg/karmadactl/cmdinit/kubernetes/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ func (i *CommandInitOption) makeKarmadaControllerManagerDeployment() *appsv1.Dep
Operator: corev1.TolerationOpExists,
},
},
ServiceAccountName: controllerManagerDeploymentAndServiceName,
AutomountServiceAccountToken: pointer.Bool(false),
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/karmadactl/cmdinit/utils/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Step 1: Use "%[2]s join" command to register the cluster to Karmada control plan
(In karmada)~# %[2]s --kubeconfig %[1]s/karmada-apiserver.config join ${MEMBER_CLUSTER_NAME} --cluster-kubeconfig=$HOME/.kube/config
Step 2: Show members of karmada
(In karmada)~# kubectl --kubeconfig %[1]s/karmada-apiserver.config get clusters
(In karmada)~# kubectl --kubeconfig %[1]s/karmada-apiserver.config get clusters
Register cluster with 'Pull' mode
Expand All @@ -193,7 +193,7 @@ Step 1: Use "%[2]s register" command to register the cluster to Karmada control
(In member cluster)~# %[2]s%[3]s
Step 2: Show members of karmada
(In karmada)~# kubectl --kubeconfig %[1]s/karmada-apiserver.config get clusters
(In karmada)~# kubectl --kubeconfig %[1]s/karmada-apiserver.config get clusters
`, path, parentCommand, printRegisterCommand)
}

0 comments on commit c0538b9

Please sign in to comment.