Skip to content

Commit 5ae8685

Browse files
mprahlopenshift-merge-robot
authored andcommitted
Remove the cluster conditions added to the placement rule
It is not a best practice to have this set for policies since a policy should still be applied to unhealthy clusters. Signed-off-by: mprahl <[email protected]>
1 parent 6949002 commit 5ae8685

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

internal/plugin.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,9 +1255,6 @@ func (p *Plugin) createPlacement(placementConfig *types.PlacementConfig, nameDef
12551255
"namespace": p.PolicyDefaults.Namespace,
12561256
},
12571257
"spec": map[string]interface{}{
1258-
"clusterConditions": []map[string]string{
1259-
{"status": "True", "type": "ManagedClusterConditionAvailable"},
1260-
},
12611258
"clusterSelector": map[string]interface{}{
12621259
"matchExpressions": matchExpressions,
12631260
},

internal/plugin_test.go

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ metadata:
145145
name: my-placement-rule
146146
namespace: my-policies
147147
spec:
148-
clusterConditions:
149-
- status: "True"
150-
type: ManagedClusterConditionAvailable
151148
clusterSelector:
152149
matchExpressions: []
153150
---
@@ -461,9 +458,6 @@ metadata:
461458
name: placement-policy-app-config
462459
namespace: my-policies
463460
spec:
464-
clusterConditions:
465-
- status: "True"
466-
type: ManagedClusterConditionAvailable
467461
clusterSelector:
468462
matchExpressions: []
469463
---
@@ -473,9 +467,6 @@ metadata:
473467
name: placement-policy-app-config2
474468
namespace: my-policies
475469
spec:
476-
clusterConditions:
477-
- status: "True"
478-
type: ManagedClusterConditionAvailable
479470
clusterSelector:
480471
matchExpressions: []
481472
---
@@ -1084,9 +1075,6 @@ metadata:
10841075
name: placement-policy-app-config
10851076
namespace: my-policies
10861077
spec:
1087-
clusterConditions:
1088-
- status: "True"
1089-
type: ManagedClusterConditionAvailable
10901078
clusterSelector:
10911079
matchExpressions:
10921080
- key: cloud
@@ -1227,9 +1215,6 @@ metadata:
12271215
name: my-plr
12281216
namespace: my-policies
12291217
spec:
1230-
clusterConditions:
1231-
- status: "True"
1232-
type: ManagedClusterConditionAvailable
12331218
clusterSelector:
12341219
matchExpressions:
12351220
- key: game
@@ -1287,9 +1272,6 @@ kind: PlacementRule
12871272
metadata:
12881273
namespace: my-policies
12891274
spec:
1290-
clusterConditions:
1291-
- status: "True"
1292-
type: ManagedClusterConditionAvailable
12931275
clusterSelector:
12941276
matchExpressions: []
12951277
`
@@ -1314,9 +1296,6 @@ kind: PlacementRule
13141296
metadata:
13151297
name: my-plr
13161298
spec:
1317-
clusterConditions:
1318-
- status: "True"
1319-
type: ManagedClusterConditionAvailable
13201299
clusterSelector:
13211300
matchExpressions: []
13221301
`
@@ -1342,9 +1321,6 @@ metadata:
13421321
name: my-plr
13431322
namespace: wrong-namespace
13441323
spec:
1345-
clusterConditions:
1346-
- status: "True"
1347-
type: ManagedClusterConditionAvailable
13481324
clusterSelector:
13491325
matchExpressions: []
13501326
`
@@ -1896,9 +1872,6 @@ metadata:
18961872
name: my-placement-rule
18971873
namespace: my-policies
18981874
spec:
1899-
clusterConditions:
1900-
- status: "True"
1901-
type: ManagedClusterConditionAvailable
19021875
clusterSelector:
19031876
matchExpressions: []
19041877
---
@@ -2019,9 +1992,6 @@ metadata:
20191992
name: my-placement
20201993
namespace: my-policies
20211994
spec:
2022-
clusterConditions:
2023-
- status: "True"
2024-
type: ManagedClusterConditionAvailable
20251995
clusterSelector:
20261996
matchExpressions: []
20271997
---
@@ -2031,9 +2001,6 @@ metadata:
20312001
name: policyset-placement
20322002
namespace: my-policies
20332003
spec:
2034-
clusterConditions:
2035-
- status: "True"
2036-
type: ManagedClusterConditionAvailable
20372004
clusterSelector:
20382005
matchExpressions:
20392006
- key: my

0 commit comments

Comments
 (0)