fix: another argo migration fix
This commit is contained in:
parent
68997b535d
commit
bca7f5fd45
@ -1,7 +0,0 @@
|
|||||||
spec:
|
|
||||||
syncWindows:
|
|
||||||
- kind: deny
|
|
||||||
schedule: '0 * * * *'
|
|
||||||
duration: 24h
|
|
||||||
namespaces:
|
|
||||||
- '*'
|
|
@ -16,7 +16,10 @@ pre_control_plane_upgrade_cluster() {
|
|||||||
post_control_plane_upgrade_cluster() {
|
post_control_plane_upgrade_cluster() {
|
||||||
# delete previous root app controlled by kubezero module
|
# delete previous root app controlled by kubezero module
|
||||||
kubectl delete application kubezero-git-sync -n argocd || true
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,13 +20,13 @@ echo "Checking that all pods in kube-system are running ..."
|
|||||||
[ "$ARGOCD" == "true" ] && disable_argo
|
[ "$ARGOCD" == "true" ] && disable_argo
|
||||||
|
|
||||||
# Check if we already have all controllers on the current version
|
# 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
|
if [ "$OLD_CONTROLLERS" == "0" ]; then
|
||||||
|
# All controllers already on current version
|
||||||
control_plane_upgrade finalize_cluster_upgrade
|
control_plane_upgrade finalize_cluster_upgrade
|
||||||
# Otherwise run control plane upgrade
|
|
||||||
else
|
else
|
||||||
|
# Otherwise run control plane upgrade
|
||||||
control_plane_upgrade kubeadm_upgrade
|
control_plane_upgrade kubeadm_upgrade
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ read -r
|
|||||||
#[ "$ARGOCD" == "true" ] && kubectl edit app kubezero -n argocd || kubectl edit cm kubezero-values -n kubezero
|
#[ "$ARGOCD" == "true" ] && kubectl edit app kubezero -n argocd || kubectl edit cm kubezero-values -n kubezero
|
||||||
|
|
||||||
# upgrade modules
|
# 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 ..."
|
echo "Checking that all pods in kube-system are running ..."
|
||||||
waitSystemPodsRunning
|
waitSystemPodsRunning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user