Skip to content

Commit

Permalink
Add unavailable toleration to Placement
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaiducek authored and openshift-merge-bot[bot] committed Mar 1, 2024
1 parent 0b07cc7 commit fce57b1
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,10 @@ func (p *Plugin) createPlacement(
},
},
"tolerations": []map[string]interface{}{
{
"key": "cluster.open-cluster-management.io/unavailable",
"operator": "Exists",
},
{
"key": "cluster.open-cluster-management.io/unreachable",
"operator": "Exists",
Expand Down
32 changes: 32 additions & 0 deletions internal/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down Expand Up @@ -775,6 +777,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -789,6 +793,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down Expand Up @@ -1756,6 +1762,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -1801,6 +1809,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -1901,6 +1911,8 @@ spec:
values:
- pacman
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2048,6 +2060,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2159,6 +2173,8 @@ spec:
values:
- pacman
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2217,6 +2233,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2246,6 +2264,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2276,6 +2296,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -2688,6 +2710,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down Expand Up @@ -2823,6 +2847,8 @@ spec:
values:
- my-cluster
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down Expand Up @@ -3856,6 +3882,8 @@ spec:
matchLabels:
cloud: red hat
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -3909,6 +3937,8 @@ spec:
- red hat
- test
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down Expand Up @@ -3996,6 +4026,8 @@ spec:
matchLabels:
cloud: red hat
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
`
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/default-deps-propagated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -100,6 +102,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -108,6 +110,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/default-extradeps-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -123,6 +125,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/default-extradeps-propagated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -123,6 +125,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
2 changes: 2 additions & 0 deletions internal/testdata/ordering/dependency-details-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
2 changes: 2 additions & 0 deletions internal/testdata/ordering/extradeps-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -107,6 +109,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -97,6 +99,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -107,6 +109,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/ignore-pending-propagation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -108,6 +110,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -110,6 +112,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/manifest-extradeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -111,6 +113,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
2 changes: 2 additions & 0 deletions internal/testdata/ordering/one-ordered-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/override-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -100,6 +102,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
4 changes: 4 additions & 0 deletions internal/testdata/ordering/policy-extradeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand All @@ -117,6 +119,8 @@ spec:
labelSelector:
matchExpressions: []
tolerations:
- key: cluster.open-cluster-management.io/unavailable
operator: Exists
- key: cluster.open-cluster-management.io/unreachable
operator: Exists
---
Expand Down
Loading

0 comments on commit fce57b1

Please sign in to comment.