1
0
Fork 0

feat(k3s-upgrade): add podSelector to ignore lognhorn-manager and instance-manager pods

- because of storageclass longhorn-static with numberOfReplicas=1, it is impossible to drain nodes without violating pod disruption budget
- dataloss may occur on volume-level, but postgres-operator should replicate data from primary, if primary is evicted, new will be selected
This commit is contained in:
Vojtěch Mareš 2023-11-17 10:13:04 +01:00
parent 7bcd56e8d0
commit a49633c4dd
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -16,6 +16,7 @@ spec:
- {key: k3os.io/mode, operator: DoesNotExist}
- {key: node-role.kubernetes.io/control-plane, operator: Exists}
serviceAccountName: system-upgrade
jobActiveDeadlineSecs: 3600
cordon: true
drain:
timeout: 900s # 15 minutes
@ -23,5 +24,18 @@ spec:
ignoreDaemonSets: true
deleteLocalData: true
skipWaitForDeleteTimeout: 180
# ! We ignore longhorn-manager and instance-manager pods
# ! because with storageclass longhorn-static which has only single replica, it is impossible to drain the node
# ! without violating the pod disruption budget.
podSelector:
matchExpressions:
- key: app
operator: NotIn
values:
- longhorn-manager
- key: longhorn.io/component
operator: NotIn
values:
- instance-manager
upgrade:
image: rancher/k3s-upgrade