Skip to content

Commit fce57b1

Browse files
dhaiducekopenshift-merge-bot[bot]
authored andcommitted
Add unavailable toleration to Placement
ref: https://issues.redhat.com/browse/ACM-9871 Signed-off-by: Dale Haiducek <[email protected]>
1 parent 0b07cc7 commit fce57b1

20 files changed

+98
-0
lines changed

internal/plugin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,10 @@ func (p *Plugin) createPlacement(
16531653
},
16541654
},
16551655
"tolerations": []map[string]interface{}{
1656+
{
1657+
"key": "cluster.open-cluster-management.io/unavailable",
1658+
"operator": "Exists",
1659+
},
16561660
{
16571661
"key": "cluster.open-cluster-management.io/unreachable",
16581662
"operator": "Exists",

internal/plugin_test.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ spec:
171171
labelSelector:
172172
matchExpressions: []
173173
tolerations:
174+
- key: cluster.open-cluster-management.io/unavailable
175+
operator: Exists
174176
- key: cluster.open-cluster-management.io/unreachable
175177
operator: Exists
176178
---
@@ -775,6 +777,8 @@ spec:
775777
labelSelector:
776778
matchExpressions: []
777779
tolerations:
780+
- key: cluster.open-cluster-management.io/unavailable
781+
operator: Exists
778782
- key: cluster.open-cluster-management.io/unreachable
779783
operator: Exists
780784
---
@@ -789,6 +793,8 @@ spec:
789793
labelSelector:
790794
matchExpressions: []
791795
tolerations:
796+
- key: cluster.open-cluster-management.io/unavailable
797+
operator: Exists
792798
- key: cluster.open-cluster-management.io/unreachable
793799
operator: Exists
794800
---
@@ -1756,6 +1762,8 @@ spec:
17561762
labelSelector:
17571763
matchExpressions: []
17581764
tolerations:
1765+
- key: cluster.open-cluster-management.io/unavailable
1766+
operator: Exists
17591767
- key: cluster.open-cluster-management.io/unreachable
17601768
operator: Exists
17611769
`
@@ -1801,6 +1809,8 @@ spec:
18011809
labelSelector:
18021810
matchExpressions: []
18031811
tolerations:
1812+
- key: cluster.open-cluster-management.io/unavailable
1813+
operator: Exists
18041814
- key: cluster.open-cluster-management.io/unreachable
18051815
operator: Exists
18061816
`
@@ -1901,6 +1911,8 @@ spec:
19011911
values:
19021912
- pacman
19031913
tolerations:
1914+
- key: cluster.open-cluster-management.io/unavailable
1915+
operator: Exists
19041916
- key: cluster.open-cluster-management.io/unreachable
19051917
operator: Exists
19061918
`
@@ -2048,6 +2060,8 @@ spec:
20482060
labelSelector:
20492061
matchExpressions: []
20502062
tolerations:
2063+
- key: cluster.open-cluster-management.io/unavailable
2064+
operator: Exists
20512065
- key: cluster.open-cluster-management.io/unreachable
20522066
operator: Exists
20532067
`
@@ -2159,6 +2173,8 @@ spec:
21592173
values:
21602174
- pacman
21612175
tolerations:
2176+
- key: cluster.open-cluster-management.io/unavailable
2177+
operator: Exists
21622178
- key: cluster.open-cluster-management.io/unreachable
21632179
operator: Exists
21642180
`
@@ -2217,6 +2233,8 @@ spec:
22172233
labelSelector:
22182234
matchExpressions: []
22192235
tolerations:
2236+
- key: cluster.open-cluster-management.io/unavailable
2237+
operator: Exists
22202238
- key: cluster.open-cluster-management.io/unreachable
22212239
operator: Exists
22222240
`
@@ -2246,6 +2264,8 @@ spec:
22462264
labelSelector:
22472265
matchExpressions: []
22482266
tolerations:
2267+
- key: cluster.open-cluster-management.io/unavailable
2268+
operator: Exists
22492269
- key: cluster.open-cluster-management.io/unreachable
22502270
operator: Exists
22512271
`
@@ -2276,6 +2296,8 @@ spec:
22762296
labelSelector:
22772297
matchExpressions: []
22782298
tolerations:
2299+
- key: cluster.open-cluster-management.io/unavailable
2300+
operator: Exists
22792301
- key: cluster.open-cluster-management.io/unreachable
22802302
operator: Exists
22812303
`
@@ -2688,6 +2710,8 @@ spec:
26882710
labelSelector:
26892711
matchExpressions: []
26902712
tolerations:
2713+
- key: cluster.open-cluster-management.io/unavailable
2714+
operator: Exists
26912715
- key: cluster.open-cluster-management.io/unreachable
26922716
operator: Exists
26932717
---
@@ -2823,6 +2847,8 @@ spec:
28232847
values:
28242848
- my-cluster
28252849
tolerations:
2850+
- key: cluster.open-cluster-management.io/unavailable
2851+
operator: Exists
28262852
- key: cluster.open-cluster-management.io/unreachable
28272853
operator: Exists
28282854
---
@@ -3856,6 +3882,8 @@ spec:
38563882
matchLabels:
38573883
cloud: red hat
38583884
tolerations:
3885+
- key: cluster.open-cluster-management.io/unavailable
3886+
operator: Exists
38593887
- key: cluster.open-cluster-management.io/unreachable
38603888
operator: Exists
38613889
`
@@ -3909,6 +3937,8 @@ spec:
39093937
- red hat
39103938
- test
39113939
tolerations:
3940+
- key: cluster.open-cluster-management.io/unavailable
3941+
operator: Exists
39123942
- key: cluster.open-cluster-management.io/unreachable
39133943
operator: Exists
39143944
`
@@ -3996,6 +4026,8 @@ spec:
39964026
matchLabels:
39974027
cloud: red hat
39984028
tolerations:
4029+
- key: cluster.open-cluster-management.io/unavailable
4030+
operator: Exists
39994031
- key: cluster.open-cluster-management.io/unreachable
40004032
operator: Exists
40014033
`

internal/testdata/ordering/default-deps-propagated.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ spec:
8686
labelSelector:
8787
matchExpressions: []
8888
tolerations:
89+
- key: cluster.open-cluster-management.io/unavailable
90+
operator: Exists
8991
- key: cluster.open-cluster-management.io/unreachable
9092
operator: Exists
9193
---
@@ -100,6 +102,8 @@ spec:
100102
labelSelector:
101103
matchExpressions: []
102104
tolerations:
105+
- key: cluster.open-cluster-management.io/unavailable
106+
operator: Exists
103107
- key: cluster.open-cluster-management.io/unreachable
104108
operator: Exists
105109
---

internal/testdata/ordering/default-extradeps-consolidated.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ spec:
9494
labelSelector:
9595
matchExpressions: []
9696
tolerations:
97+
- key: cluster.open-cluster-management.io/unavailable
98+
operator: Exists
9799
- key: cluster.open-cluster-management.io/unreachable
98100
operator: Exists
99101
---
@@ -108,6 +110,8 @@ spec:
108110
labelSelector:
109111
matchExpressions: []
110112
tolerations:
113+
- key: cluster.open-cluster-management.io/unavailable
114+
operator: Exists
111115
- key: cluster.open-cluster-management.io/unreachable
112116
operator: Exists
113117
---

internal/testdata/ordering/default-extradeps-override.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ spec:
109109
labelSelector:
110110
matchExpressions: []
111111
tolerations:
112+
- key: cluster.open-cluster-management.io/unavailable
113+
operator: Exists
112114
- key: cluster.open-cluster-management.io/unreachable
113115
operator: Exists
114116
---
@@ -123,6 +125,8 @@ spec:
123125
labelSelector:
124126
matchExpressions: []
125127
tolerations:
128+
- key: cluster.open-cluster-management.io/unavailable
129+
operator: Exists
126130
- key: cluster.open-cluster-management.io/unreachable
127131
operator: Exists
128132
---

internal/testdata/ordering/default-extradeps-propagated.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ spec:
109109
labelSelector:
110110
matchExpressions: []
111111
tolerations:
112+
- key: cluster.open-cluster-management.io/unavailable
113+
operator: Exists
112114
- key: cluster.open-cluster-management.io/unreachable
113115
operator: Exists
114116
---
@@ -123,6 +125,8 @@ spec:
123125
labelSelector:
124126
matchExpressions: []
125127
tolerations:
128+
- key: cluster.open-cluster-management.io/unavailable
129+
operator: Exists
126130
- key: cluster.open-cluster-management.io/unreachable
127131
operator: Exists
128132
---

internal/testdata/ordering/dependency-details-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ spec:
4848
labelSelector:
4949
matchExpressions: []
5050
tolerations:
51+
- key: cluster.open-cluster-management.io/unavailable
52+
operator: Exists
5153
- key: cluster.open-cluster-management.io/unreachable
5254
operator: Exists
5355
---

internal/testdata/ordering/extradeps-overrides.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ spec:
4848
labelSelector:
4949
matchExpressions: []
5050
tolerations:
51+
- key: cluster.open-cluster-management.io/unavailable
52+
operator: Exists
5153
- key: cluster.open-cluster-management.io/unreachable
5254
operator: Exists
5355
---

internal/testdata/ordering/ignore-pending-manifest-override.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ spec:
9393
labelSelector:
9494
matchExpressions: []
9595
tolerations:
96+
- key: cluster.open-cluster-management.io/unavailable
97+
operator: Exists
9698
- key: cluster.open-cluster-management.io/unreachable
9799
operator: Exists
98100
---
@@ -107,6 +109,8 @@ spec:
107109
labelSelector:
108110
matchExpressions: []
109111
tolerations:
112+
- key: cluster.open-cluster-management.io/unavailable
113+
operator: Exists
110114
- key: cluster.open-cluster-management.io/unreachable
111115
operator: Exists
112116
---

internal/testdata/ordering/ignore-pending-policy-consolidated.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ spec:
8383
labelSelector:
8484
matchExpressions: []
8585
tolerations:
86+
- key: cluster.open-cluster-management.io/unavailable
87+
operator: Exists
8688
- key: cluster.open-cluster-management.io/unreachable
8789
operator: Exists
8890
---
@@ -97,6 +99,8 @@ spec:
9799
labelSelector:
98100
matchExpressions: []
99101
tolerations:
102+
- key: cluster.open-cluster-management.io/unavailable
103+
operator: Exists
100104
- key: cluster.open-cluster-management.io/unreachable
101105
operator: Exists
102106
---

0 commit comments

Comments
 (0)