Compare commits

...

3 Commits

5 changed files with 60 additions and 30 deletions

View File

@ -14,45 +14,64 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ARGOCD=$(argo_used)
control_plane_phase1() {
admin_job "upgrade_control_plane, upgrade_kubezero"
#echo "Adjust kubezero values as needed:"
# shellcheck disable=SC2015
#[ "$ARGOCD" == "true" ] && kubectl edit app kubezero -n argocd || kubectl edit cm kubezero-values -n kubezero
#echo "<Return> to continue"
#read -r
# upgrade modules
admin_job "apply_kubezero, apply_network"
echo "Checking that all pods in kube-system are running ..."
waitSystemPodsRunning
}
control_plane_phase2() {
# Final control plane upgrades
admin_job "upgrade_control_plane"
}
cluster_modules() {
echo "Applying remaining KubeZero modules..."
admin_job "apply_policy, apply_addons, apply_storage, apply_operators, apply_cert-manager, apply_istio, apply_istio-ingress, apply_istio-private-ingress, apply_logging, apply_metrics, apply_telemetry, apply_argo"
# Final step is to commit the new argocd kubezero app
kubectl get app kubezero -n argocd -o yaml | yq 'del(.status) | del(.metadata) | del(.operation) | .metadata.name="kubezero" | .metadata.namespace="argocd"' | yq 'sort_keys(..)' > $ARGO_APP
}
backup() {
# Trigger backup of upgraded cluster state
kubectl create job --from=cronjob/kubezero-backup kubezero-backup-$KUBE_VERSION -n kube-system
while true; do
kubectl wait --for=condition=complete job/kubezero-backup-$KUBE_VERSION -n kube-system 2>/dev/null && kubectl delete job kubezero-backup-$KUBE_VERSION -n kube-system && break
sleep 1
done
}
#####
echo "Checking that all pods in kube-system are running ..."
waitSystemPodsRunning
[ "$ARGOCD" == "true" ] && disable_argo
admin_job "upgrade_control_plane, upgrade_kubezero"
control_plane_phase1
#echo "Adjust kubezero values as needed:"
# shellcheck disable=SC2015
#[ "$ARGOCD" == "true" ] && kubectl edit app kubezero -n argocd || kubectl edit cm kubezero-values -n kubezero
cluster_modules
#echo "<Return> to continue"
#read -r
# upgrade modules
admin_job "apply_kubezero, apply_network"
echo "Checking that all pods in kube-system are running ..."
waitSystemPodsRunning
echo "Applying remaining KubeZero modules..."
admin_job "apply_policy, apply_addons, apply_storage, apply_operators, apply_cert-manager, apply_istio, apply_istio-ingress, apply_istio-private-ingress, apply_logging, apply_metrics, apply_telemetry, apply_argo"
# Final step is to commit the new argocd kubezero app
kubectl get app kubezero -n argocd -o yaml | yq 'del(.status) | del(.metadata) | del(.operation) | .metadata.name="kubezero" | .metadata.namespace="argocd"' | yq 'sort_keys(..)' > $ARGO_APP
# Trigger backup of upgraded cluster state
kubectl create job --from=cronjob/kubezero-backup kubezero-backup-$KUBE_VERSION -n kube-system
while true; do
kubectl wait --for=condition=complete job/kubezero-backup-$KUBE_VERSION -n kube-system 2>/dev/null && kubectl delete job kubezero-backup-$KUBE_VERSION -n kube-system && break
sleep 1
done
backup
echo "Once ALL nodes, incl. workers, ALL, are running on $KUBE_VERSION, <return> to continue"
read -r
# Final control plane upgrades
admin_job "upgrade_control_plane"
control_plane_phase2
echo "Please commit $ARGO_APP as the updated kubezero/application.yaml for your cluster."
echo "Then head over to ArgoCD for this cluster and sync all KubeZero modules to apply remaining upgrades."

View File

@ -6,3 +6,10 @@ spec:
requests:
cpu: 200m
memory: 1536Mi
limits:
memory: 3Gi
env:
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-metrics
description: KubeZero Umbrella Chart for Prometheus, Grafana and Alertmanager as well as all Kubernetes integrations.
type: application
version: 0.12.0
version: 0.12.1
home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords:
@ -19,7 +19,7 @@ dependencies:
version: 0.2.1
repository: https://cdn.zero-downtime.net/charts/
- name: kube-prometheus-stack
version: 75.2.1
version: 75.6.0
repository: https://prometheus-community.github.io/helm-charts
- name: prometheus-adapter
version: 4.14.1

View File

@ -208,6 +208,8 @@ aws-efs-csi-driver:
useHelmHooksForCSIDriver: false
# we use the old 1.7 atm
replicaCount: 1
# image:
# tag: "v2.0.9"

View File

@ -62,6 +62,8 @@ aws-ebs-csi-driver:
aws-efs-csi-driver:
enabled: {{ default false (index .Values "storage" "aws-efs-csi-driver" "enabled")}}
# Temp for old 1.7 chart we use atm
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
controller:
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
{{- if .Values.global.highAvailable }}