Commit ea3bfdb
committed
Fix labelSelector for podAntiAffinity rule
right now the pod template specifies these labels and affinity
labelSelector.
~~~
template:
metadata:
creationTimestamp: null
labels:
app: galera
cr: galera-openstack-cell1
galera/name: openstack-cell1
galera/namespace: openstack
galera/uid: a14e79ce-ef87-41eb-9e05-ddbaeccb82af
owner: mariadb-operator
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: service
operator: In
values:
- openstack-cell1-galera
topologyKey: kubernetes.io/hostname
weight: 1
~~~
Which means that the podAntiAffinity would never bump the weight
for the galera pods.
This adds a label with the common service selector.
Related: https://issues.redhat.com/browse/OSPRH-8870
Signed-off-by: Martin Schuppert <[email protected]>1 parent 8b86dae commit ea3bfdb
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments