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:
parent
7bcd56e8d0
commit
a49633c4dd
1 changed files with 14 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ spec:
|
||||||
- {key: k3os.io/mode, operator: DoesNotExist}
|
- {key: k3os.io/mode, operator: DoesNotExist}
|
||||||
- {key: node-role.kubernetes.io/control-plane, operator: Exists}
|
- {key: node-role.kubernetes.io/control-plane, operator: Exists}
|
||||||
serviceAccountName: system-upgrade
|
serviceAccountName: system-upgrade
|
||||||
|
jobActiveDeadlineSecs: 3600
|
||||||
cordon: true
|
cordon: true
|
||||||
drain:
|
drain:
|
||||||
timeout: 900s # 15 minutes
|
timeout: 900s # 15 minutes
|
||||||
|
|
@ -23,5 +24,18 @@ spec:
|
||||||
ignoreDaemonSets: true
|
ignoreDaemonSets: true
|
||||||
deleteLocalData: true
|
deleteLocalData: true
|
||||||
skipWaitForDeleteTimeout: 180
|
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:
|
upgrade:
|
||||||
image: rancher/k3s-upgrade
|
image: rancher/k3s-upgrade
|
||||||
|
|
|
||||||
Reference in a new issue