We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72ca429 commit f2a5573Copy full SHA for f2a5573
1 file changed
internal/controller/overcommitclass/utils.go
@@ -224,6 +224,22 @@ func webhookChanged(updated, current interface{}) bool {
224
}
225
226
227
+ // Compare MatchConditions (including CEL expressions for namespace exclusion)
228
+ if len(updatedWebhook.MatchConditions) != len(currentWebhook.MatchConditions) {
229
+ return true
230
+ }
231
+
232
+ for i, updatedCondition := range updatedWebhook.MatchConditions {
233
+ if i >= len(currentWebhook.MatchConditions) {
234
235
236
+ currentCondition := currentWebhook.MatchConditions[i]
237
+ if updatedCondition.Name != currentCondition.Name ||
238
+ updatedCondition.Expression != currentCondition.Expression {
239
240
241
242
243
// If we reach here, they're likely the same
244
return false
245
0 commit comments