diff --git a/_argoapp_patch.yaml b/_argoapp_patch.yaml deleted file mode 100644 index 4a1ceffe..00000000 --- a/_argoapp_patch.yaml +++ /dev/null @@ -1,7 +0,0 @@ -spec: - syncWindows: - - kind: deny - schedule: '0 * * * *' - duration: 24h - namespaces: - - '*' diff --git a/admin/hooks-1.31.sh b/admin/hooks-1.31.sh index 0c8bfe99..ea6dd3a8 100644 --- a/admin/hooks-1.31.sh +++ b/admin/hooks-1.31.sh @@ -16,7 +16,10 @@ pre_control_plane_upgrade_cluster() { post_control_plane_upgrade_cluster() { # delete previous root app controlled by kubezero module kubectl delete application kubezero-git-sync -n argocd || true - kubectl delete appproject kubezero -n argocd || true + + # Patch appproject to keep SyncWindow in place + kubectl patch appproject kubezero -n argocd --type json -p='[{"op": "remove", "path": "/metadata/labels"}]' || true + kubectl patch appproject kubezero -n argocd --type json -p='[{"op": "remove", "path": "/metadata/annotations"}]' || true } diff --git a/admin/upgrade_cluster.sh b/admin/upgrade_cluster.sh index 8dc0dda3..d249d454 100755 --- a/admin/upgrade_cluster.sh +++ b/admin/upgrade_cluster.sh @@ -20,13 +20,13 @@ echo "Checking that all pods in kube-system are running ..." [ "$ARGOCD" == "true" ] && disable_argo # Check if we already have all controllers on the current version -OLD_CONTROLLERS=$(kubectl get nodes -l "node-role.kubernetes.io/control-plane=" --no-headers=true | grep -cv $KUBE_VERSION || true) +#OLD_CONTROLLERS=$(kubectl get nodes -l "node-role.kubernetes.io/control-plane=" --no-headers=true | grep -cv $KUBE_VERSION || true) -# All controllers already on current version if [ "$OLD_CONTROLLERS" == "0" ]; then + # All controllers already on current version control_plane_upgrade finalize_cluster_upgrade -# Otherwise run control plane upgrade else + # Otherwise run control plane upgrade control_plane_upgrade kubeadm_upgrade fi @@ -38,7 +38,7 @@ read -r #[ "$ARGOCD" == "true" ] && kubectl edit app kubezero -n argocd || kubectl edit cm kubezero-values -n kubezero # upgrade modules -control_plane_upgrade "apply_kubezero apply_network, apply_addons, apply_storage, apply_operators" +control_plane_upgrade "apply_kubezero, apply_network, apply_addons, apply_storage, apply_operators" echo "Checking that all pods in kube-system are running ..." waitSystemPodsRunning