From cff88e0ec6a0080ba17ced67c80ff768103a8857 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 1 Nov 2023 12:46:02 +0800 Subject: [PATCH 01/18] Update common.go update controllerManager.extraArgs.cluster-signing-duration support --- pkg/runtime/kubernetes/kubeadm/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/runtime/kubernetes/kubeadm/common.go b/pkg/runtime/kubernetes/kubeadm/common.go index 3c150aceb8d..10ce369a94c 100644 --- a/pkg/runtime/kubernetes/kubeadm/common.go +++ b/pkg/runtime/kubernetes/kubeadm/common.go @@ -66,7 +66,7 @@ apiServer: controllerManager: extraArgs: feature-gates: TTLAfterFinished=true,EphemeralContainers=true - experimental-cluster-signing-duration: 876000h + cluster-signing-duration: 876000h extraVolumes: - hostPath: /etc/localtime mountPath: /etc/localtime From 9b3776e1f764b90e61f08b6f2f5dda6322b884cd Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 25 Mar 2024 19:10:33 +0800 Subject: [PATCH 02/18] Update common.go --- pkg/runtime/kubernetes/kubeadm/common.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/runtime/kubernetes/kubeadm/common.go b/pkg/runtime/kubernetes/kubeadm/common.go index 10ce369a94c..e0fdab263f2 100644 --- a/pkg/runtime/kubernetes/kubeadm/common.go +++ b/pkg/runtime/kubernetes/kubeadm/common.go @@ -41,7 +41,6 @@ networking: serviceSubnet: 10.96.0.0/22 apiServer: extraArgs: - feature-gates: TTLAfterFinished=true,EphemeralContainers=true audit-policy-file: "/etc/kubernetes/audit-policy.yml" audit-log-path: "/var/log/kubernetes/audit.log" audit-log-format: json @@ -65,7 +64,6 @@ apiServer: pathType: File controllerManager: extraArgs: - feature-gates: TTLAfterFinished=true,EphemeralContainers=true cluster-signing-duration: 876000h extraVolumes: - hostPath: /etc/localtime @@ -74,8 +72,6 @@ controllerManager: readOnly: true pathType: File scheduler: - extraArgs: - feature-gates: TTLAfterFinished=true,EphemeralContainers=true extraVolumes: - hostPath: /etc/localtime mountPath: /etc/localtime From 3c791d191e99c296d9a22be0bac169167ec58281 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:09:58 +0800 Subject: [PATCH 03/18] Update local.go skip tls verify --- pkg/registry/local.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/registry/local.go b/pkg/registry/local.go index 15c740d6270..a0bc6b18bcb 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -393,13 +393,14 @@ func (c *localConfigurator) configureContainerdDaemonService(endpoint, hostTomlF var ( caFile = c.Domain + ".crt" registryCaCertPath = filepath.Join(c.containerRuntimeInfo.CertsDir, endpoint, caFile) - url = "https://" + endpoint + url = "http://" + endpoint ) cfg := Hosts{ Server: url, HostConfigs: map[string]HostFileConfig{ url: {CACert: registryCaCertPath}, + SkipServerVerify: true, }, } From e78975fc189d9b38c19917970b76b6086460f23d Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:18:42 +0800 Subject: [PATCH 04/18] Update local.go --- pkg/registry/local.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/registry/local.go b/pkg/registry/local.go index a0bc6b18bcb..d0d5b3b9f74 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -399,8 +399,7 @@ func (c *localConfigurator) configureContainerdDaemonService(endpoint, hostTomlF cfg := Hosts{ Server: url, HostConfigs: map[string]HostFileConfig{ - url: {CACert: registryCaCertPath}, - SkipServerVerify: true, + url: {CACert: registryCaCertPath, SkipServerVerify: true}, }, } @@ -426,6 +425,7 @@ type HostFileConfig struct { // - string - Single file with certificate(s) // - []string - Multiple files with certificates CACert interface{} `toml:"ca"` + SkipServerVerify bool `toml:"skip_verify"` } type DaemonConfig struct { From 4366a58a3c96c38f5ecaeb45fb2b8a19a2d458b6 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:47:12 +0800 Subject: [PATCH 05/18] Update rollback.go disable save clusterfile --- cmd/sealer/cmd/cluster/rollback.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sealer/cmd/cluster/rollback.go b/cmd/sealer/cmd/cluster/rollback.go index 91c93875ffb..375e22e866f 100644 --- a/cmd/sealer/cmd/cluster/rollback.go +++ b/cmd/sealer/cmd/cluster/rollback.go @@ -206,7 +206,7 @@ func rollbackCluster(cf clusterfile.Interface, imageEngine imageengine.Interface } //save and commit - if err = cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err = cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } From 11825cdfd5f4216f4fb4628533b5eb18e30df4a8 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:50:46 +0800 Subject: [PATCH 06/18] Update upgrade.go --- cmd/sealer/cmd/cluster/upgrade.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/sealer/cmd/cluster/upgrade.go b/cmd/sealer/cmd/cluster/upgrade.go index d6a5d797d51..2ab66fc2db8 100644 --- a/cmd/sealer/cmd/cluster/upgrade.go +++ b/cmd/sealer/cmd/cluster/upgrade.go @@ -36,8 +36,7 @@ import ( var ( exampleForUpgradeCmd = ` - sealer upgrade docker.io/sealerio/kubernetes:v1.22.15-upgrade - sealer upgrade -f Clusterfile + sealer upgrade -f upgrade.yaml ` longDescriptionForUpgradeCmd = `upgrade command is used to upgrade a Kubernetes cluster via specified Clusterfile.` ) @@ -209,7 +208,7 @@ func upgradeCluster(cf clusterfile.Interface, imageEngine imageengine.Interface, } //save and commit - if err = cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err = cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } From 83a529796c71769e5db151cedcb3859cb0e8dd4f Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:51:20 +0800 Subject: [PATCH 07/18] Update host-alias.go --- cmd/sealer/cmd/alpha/host-alias.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sealer/cmd/alpha/host-alias.go b/cmd/sealer/cmd/alpha/host-alias.go index 13df9a32284..89a55957f91 100644 --- a/cmd/sealer/cmd/alpha/host-alias.go +++ b/cmd/sealer/cmd/alpha/host-alias.go @@ -71,7 +71,7 @@ func NewHostAliasCmd() *cobra.Command { cf.SetCluster(desiredCluster) - return cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true}) + return cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false}) }, } cmd.Flags().StringVar(&hostAlias.IP, "ip", "", "host-alias ip") From 91623fa5c1c34835c477a890b7b83d6f79aee22b Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:52:27 +0800 Subject: [PATCH 08/18] Update installer.go --- cmd/sealer/cmd/cluster/installer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/sealer/cmd/cluster/installer.go b/cmd/sealer/cmd/cluster/installer.go index de0549d6277..fd97b7fe6d5 100644 --- a/cmd/sealer/cmd/cluster/installer.go +++ b/cmd/sealer/cmd/cluster/installer.go @@ -80,7 +80,7 @@ func (i AppInstaller) Install(imageName string, options AppInstallOptions) error //save and commit i.cf.SetApplication(i.appDriver.GetApplication()) confPath := clusterruntime.GetClusterConfPath(i.imageExtension.Labels) - if err := i.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err := i.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } @@ -350,7 +350,7 @@ func (k KubeInstaller) Install(kubeImageName string, options KubeInstallOptions) //save and commit confPath := clusterruntime.GetClusterConfPath(k.imageSpec.ImageExtension.Labels) - if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } @@ -436,7 +436,7 @@ func (k KubeInstaller) ScaleUp(scaleUpMasterIPList, scaleUpNodeIPList []net.IP, } confPath := clusterruntime.GetClusterConfPath(k.imageSpec.ImageExtension.Labels) - if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } @@ -519,7 +519,7 @@ func (k KubeInstaller) ScaleDown(deleteMasterIPList, deleteNodeIPList []net.IP, k.cf.SetCluster(cluster) confPath := clusterruntime.GetClusterConfPath(k.imageSpec.ImageExtension.Labels) - if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: true, ConfPath: confPath}); err != nil { + if err = k.cf.SaveAll(clusterfile.SaveOptions{CommitToCluster: false, ConfPath: confPath}); err != nil { return err } From 2c73e17a356ab1616901ce67d5ba6a7546eaa1ca Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:52:58 +0800 Subject: [PATCH 09/18] Update common.go --- common/common.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/common.go b/common/common.go index 756648fea81..5371cc1f553 100644 --- a/common/common.go +++ b/common/common.go @@ -46,7 +46,7 @@ const ( KubeLvsCareStaticPodName = "kube-lvscare" RegLvsCareStaticPodName = "reg-lvscare" StaticPodDir = "/etc/kubernetes/manifests" - LvsCareRepoAndTag = "sealerio/lvscare:v1.1.3-beta.8" + LvsCareRepoAndTag = "lvscare:latest" ) // Envs @@ -86,9 +86,9 @@ const ( // image module const ( DefaultMetadataName = "Metadata" - DefaultRegistryDomain = "sea.hub" + DefaultRegistryDomain = "mks.hub" DefaultRegistryPort = 5000 - DefaultRegistryURL = "sea.hub:5000" + DefaultRegistryURL = "mks.hub:5000" DefaultRegistryHtPasswdFile = "registry_htpasswd" ) From d2c54b9a7cf236cf1853e3872c39f9f5e722a9ca Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:58:04 +0800 Subject: [PATCH 10/18] Update common.go --- common/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common.go b/common/common.go index 5371cc1f553..56cffea2bd1 100644 --- a/common/common.go +++ b/common/common.go @@ -46,7 +46,7 @@ const ( KubeLvsCareStaticPodName = "kube-lvscare" RegLvsCareStaticPodName = "reg-lvscare" StaticPodDir = "/etc/kubernetes/manifests" - LvsCareRepoAndTag = "lvscare:latest" + LvsCareRepoAndTag = "global/lvscare:latest" ) // Envs From 1d76880eb303381fee2021e00b580cc243ed5b64 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:11:36 +0800 Subject: [PATCH 11/18] Update release.yml --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16637b26632..8c989a45407 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: echo "${{steps.drafter.outputs.body}}" >> release_note.md - name: Save release notes - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: sealer-release-notes path: src/github.com/sealerio/sealer/release_note.md @@ -94,7 +94,7 @@ jobs: working-directory: src/github.com/sealerio/sealer - name: Save build binaries - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: sealer-binaries path: src/github.com/sealerio/sealer/_output/assets/*.tar.gz* @@ -131,4 +131,4 @@ jobs: releasever="${releasever#refs/tags/}" wget http://gosspublic.alicdn.com/ossutil/1.6.19/ossutil64 && chmod 755 ossutil64 && ./ossutil64 -i ${{ secrets.ACCESSKEYID }} -k ${{ secrets.ACCESSKEYSECRET }} -e oss-cn-shanghai.aliyuncs.com cp -rf ./builds/sealer-binaries/sealer-$releasever-linux-amd64.tar.gz oss://sealerio/releases/sealer-$releasever-linux-amd64.tar.gz && - ./ossutil64 -i ${{ secrets.ACCESSKEYID }} -k ${{ secrets.ACCESSKEYSECRET }} -e oss-cn-shanghai.aliyuncs.com cp -rf ./builds/sealer-binaries/sealer-$releasever-linux-arm64.tar.gz oss://sealerio/releases/sealer-$releasever-linux-arm64.tar.gz \ No newline at end of file + ./ossutil64 -i ${{ secrets.ACCESSKEYID }} -k ${{ secrets.ACCESSKEYSECRET }} -e oss-cn-shanghai.aliyuncs.com cp -rf ./builds/sealer-binaries/sealer-$releasever-linux-arm64.tar.gz oss://sealerio/releases/sealer-$releasever-linux-arm64.tar.gz From e4181c5fd0f121f3a89385fc478eaebe6f62fe81 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:23:12 +0800 Subject: [PATCH 12/18] Update common.go --- common/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/common.go b/common/common.go index 56cffea2bd1..d0e6908abbd 100644 --- a/common/common.go +++ b/common/common.go @@ -86,9 +86,9 @@ const ( // image module const ( DefaultMetadataName = "Metadata" - DefaultRegistryDomain = "mks.hub" + DefaultRegistryDomain = "sea.hub" DefaultRegistryPort = 5000 - DefaultRegistryURL = "mks.hub:5000" + DefaultRegistryURL = "sea.hub:5000" DefaultRegistryHtPasswdFile = "registry_htpasswd" ) From 4180d5dacd7630924d784934ef70de1ace32e4b2 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:52:09 +0800 Subject: [PATCH 13/18] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c989a45407..e38576014f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,7 +108,7 @@ jobs: steps: - name: Download builds and release notes - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: builds - name: Create Release From ed43e76e871b7bd1aed3a26d0a75baaa989f4202 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:00:58 +0800 Subject: [PATCH 14/18] Update local.go --- pkg/registry/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/local.go b/pkg/registry/local.go index d0d5b3b9f74..0ca4100c7c4 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -393,7 +393,7 @@ func (c *localConfigurator) configureContainerdDaemonService(endpoint, hostTomlF var ( caFile = c.Domain + ".crt" registryCaCertPath = filepath.Join(c.containerRuntimeInfo.CertsDir, endpoint, caFile) - url = "http://" + endpoint + url = "https://" + endpoint ) cfg := Hosts{ From 5fe26536e37273f4e2342d8134ff7cfabc1ba52d Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:48:19 +0800 Subject: [PATCH 15/18] Update common.go --- common/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common.go b/common/common.go index d0e6908abbd..dfec1234626 100644 --- a/common/common.go +++ b/common/common.go @@ -46,7 +46,7 @@ const ( KubeLvsCareStaticPodName = "kube-lvscare" RegLvsCareStaticPodName = "reg-lvscare" StaticPodDir = "/etc/kubernetes/manifests" - LvsCareRepoAndTag = "global/lvscare:latest" + LvsCareRepoAndTag = "docker-cdv5ju.swr-pro.myhuaweicloud.com/global/lvscare:latest" ) // Envs From 3019844f01cb268e63199991c94d4a1e28892773 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:49:10 +0800 Subject: [PATCH 16/18] Update local.go --- pkg/registry/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/local.go b/pkg/registry/local.go index 0ca4100c7c4..0d112ecb1bd 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -181,7 +181,7 @@ func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) er } //todo should make lvs image name as const value in sealer repo. - lvsImageURL := path.Join(net.JoinHostPort(c.Domain, strconv.Itoa(c.Port)), common.LvsCareRepoAndTag) + lvsImageURL := path.Join(net.JoinHostPort(common.LvsCareRepoAndTag) vip := GetRegistryVIP(c.infraDriver) From dbaceefbbf986a56e53cd06caf6ef522ed21e898 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:49:49 +0800 Subject: [PATCH 17/18] Update utils.go --- pkg/runtime/kubernetes/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/runtime/kubernetes/utils.go b/pkg/runtime/kubernetes/utils.go index a4a31e6a3da..227472ac4dc 100644 --- a/pkg/runtime/kubernetes/utils.go +++ b/pkg/runtime/kubernetes/utils.go @@ -187,7 +187,7 @@ func GetClientFromConfig(adminConfPath string) (runtimeClient.Client, error) { } func (k *Runtime) configureLvs(masterHosts, clientHosts []net.IP) error { - lvsImageURL := path.Join(k.Config.RegistryInfo.URL, common.LvsCareRepoAndTag) + lvsImageURL := path.Join(common.LvsCareRepoAndTag) var rs []string var realEndpoints []string From d167011d45e513d7330a53f5adebf8212d782432 Mon Sep 17 00:00:00 2001 From: life <46099295+clcc2019@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:51:06 +0800 Subject: [PATCH 18/18] Update local.go --- pkg/registry/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/local.go b/pkg/registry/local.go index 0d112ecb1bd..c47dc16c1d8 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -181,7 +181,7 @@ func (c *localConfigurator) configureLvs(registryHosts, clientHosts []net.IP) er } //todo should make lvs image name as const value in sealer repo. - lvsImageURL := path.Join(net.JoinHostPort(common.LvsCareRepoAndTag) + lvsImageURL := path.Join(common.LvsCareRepoAndTag) vip := GetRegistryVIP(c.infraDriver)