Skip to content

Commit 28a6cf0

Browse files
committed
fix(upgrade): fix upgrade
fix upgrade Signed-off-by: ysicing <[email protected]>
1 parent ab3aac7 commit 28a6cf0

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

common/const.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const (
6464
const (
6565
DefaultQuickonOSSVersion = "3.0.2" // 开源版本
6666
DefaultQuickonEEVersion = "1.0"
67-
DefaultZentaoDevOPSOSSVersion = "18.7"
68-
DefaultZentaoDevOPSMaxVersion = "4.7"
69-
DefaultZentaoDevOPSBizVersion = "8.7"
70-
DefaultZentaoDevOPSIPDVersion = "1.0.2"
67+
DefaultZentaoDevOPSOSSVersion = "18.8"
68+
DefaultZentaoDevOPSMaxVersion = "4.8"
69+
DefaultZentaoDevOPSBizVersion = "8.8"
70+
DefaultZentaoDevOPSIPDVersion = "1.1"
7171
K3sBinName = "k3s"
7272
K3sBinPath = "/usr/local/bin/k3s"
7373
HelmBinName = "helm"

hack/manifests/scripts/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if type apt >/dev/null 2>&1; then
1414
export DEBIAN_FRONTEND=noninteractive
1515
apt update -qq
1616
apt remove -y -qq ufw lxd lxd-client lxcfs lxc-common
17-
apt install --no-install-recommends --no-install-suggests -y -qq nfs-common iptables conntrack jq socat bash-completion open-iscsi rsync ipset ipvsadm htop net-tools wget psmisc git curl nload ebtables ethtool
17+
apt install --no-install-recommends --no-install-suggests -y -qq nfs-common iptables conntrack jq socat bash-completion open-iscsi rsync ipset ipvsadm htop net-tools wget psmisc git curl nload ebtables ethtool procps
1818
systemctl enable --now iscsid
1919
# ufw disable
2020
# ufw allow 6443/tcp #apiserver

pkg/qucheng/upgrade/upgrade.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ func Upgrade(flagVersion string, log log.Logger) error {
109109
deploy := defaultValue["deploy"]
110110
product := deploy.(map[string]interface{})["product"]
111111
versions := deploy.(map[string]interface{})["versions"]
112-
appVersion := versions.(map[string]interface{})[product.(string)]
113-
log.Infof("devops mode, product: %v, version: %v", product, appVersion)
112+
appoldVersion := versions.(map[string]interface{})[product.(string)]
113+
appnewVersion := fmt.Sprintf("%s%s.k8s", product, common.GetVersion(true, product.(string), ""))
114+
log.Infof("devops mode, product: %v, oldversion: %v, newversion: %v", product, appoldVersion, appnewVersion)
115+
defaultValue["deploy"].(map[string]interface{})["versions"].(map[string]interface{})[product.(string)] = appnewVersion
114116
}
115117
if _, err := helmClient.Upgrade(cv.Name, common.DefaultHelmRepoName, cv.Name, "", defaultValue); err != nil {
116118
log.Warnf("upgrade %s failed, reason: %v", cv.Name, err)

0 commit comments

Comments
 (0)