Skip to content

Commit 2d4a9c2

Browse files
committed
chore: temporarily disable the manifest webhook in integration
1 parent 1b4a1ae commit 2d4a9c2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

build/selectorsyncset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,10 @@ objects:
10831083
operator: In
10841084
values:
10851085
- service-cluster
1086+
- key: api.openshift.com/environment
1087+
operator: NotIn
1088+
values:
1089+
- integration
10861090
matchLabels:
10871091
api.openshift.com/managed: "true"
10881092
resourceApplyMode: Sync

pkg/webhooks/manifestworks/manifestworks.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,18 @@ func (s *ManifestWorksWebhook) authorized(request admissionctl.Request) admissio
132132
// SyncSetLabelSelector returns the label selector to use in the SyncSet.
133133
func (s *ManifestWorksWebhook) SyncSetLabelSelector() metav1.LabelSelector {
134134
customLabelSelector := utils.DefaultLabelSelector()
135-
customLabelSelector.MatchExpressions = append(customLabelSelector.MatchExpressions,
135+
customLabelSelector.MatchExpressions = append(customLabelSelector.MatchExpressions, []metav1.LabelSelectorRequirement{
136136
metav1.LabelSelectorRequirement{
137137
Key: "ext-hypershift.openshift.io/cluster-type",
138138
Operator: metav1.LabelSelectorOpIn,
139139
Values: []string{"service-cluster"},
140-
})
140+
},
141+
metav1.LabelSelectorRequirement{
142+
Key: "api.openshift.com/environment",
143+
Operator: metav1.LabelSelectorOpNotIn,
144+
Values: []string{"integration"},
145+
},
146+
}...)
141147
return customLabelSelector
142148
}
143149

0 commit comments

Comments
 (0)