Skip to content

Commit 2ef588d

Browse files
Merge pull request #381 from openshift-cherrypick-robot/cherry-pick-377-to-release-0.10
[release-0.10] Add podAntiAffinity to node-healthceck-controller-manager Deployment to improve HA
2 parents f833b31 + 2e6b937 commit 2ef588d

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

bundle/manifests/node-healthcheck-operator.clusterserviceversion.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,21 @@ spec:
452452
- key: node-role.kubernetes.io/control-plane
453453
operator: Exists
454454
weight: 1
455+
podAntiAffinity:
456+
preferredDuringSchedulingIgnoredDuringExecution:
457+
- podAffinityTerm:
458+
labelSelector:
459+
matchExpressions:
460+
- key: app.kubernetes.io/component
461+
operator: In
462+
values:
463+
- controller-manager
464+
- key: app.kubernetes.io/name
465+
operator: In
466+
values:
467+
- node-healthcheck-operator
468+
topologyKey: kubernetes.io/hostname
469+
weight: 100
455470
containers:
456471
- args:
457472
- --secure-listen-address=0.0.0.0:8443

config/patches/affinity/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ patches:
44
- path: node_affinity_patch.yaml
55
target:
66
kind: Deployment
7+
- path: podantiaffinity_patch.yaml
8+
target:
9+
kind: Deployment
10+
name: controller-manager
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: n/a
5+
spec:
6+
template:
7+
spec:
8+
affinity:
9+
podAntiAffinity:
10+
preferredDuringSchedulingIgnoredDuringExecution:
11+
- weight: 100
12+
podAffinityTerm:
13+
labelSelector:
14+
matchExpressions:
15+
- key: app.kubernetes.io/component
16+
operator: In
17+
values:
18+
- controller-manager
19+
- key: app.kubernetes.io/name
20+
operator: In
21+
values:
22+
- node-healthcheck-operator
23+
topologyKey: kubernetes.io/hostname

0 commit comments

Comments
 (0)