Skip to content

Commit

Permalink
fix: do not exit when k8s' matchConditions are not available
Browse files Browse the repository at this point in the history
Do not exit with an error when the `matchConditions` field is not
available for ValidatingWebhookConfiguration and
MutatingWebhookConfiguration.

The code is already structured to work when this feature is not
available, hence we don't have to cause the controller to exit with an
error.

Fixes #900

Signed-off-by: Flavio Castelli <[email protected]>
  • Loading branch information
flavio committed Oct 1, 2024
1 parent 4be87f4 commit f05f8aa
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ func main() {
featureGateAdmissionWebhookMatchConditions, err := featuregates.CheckAdmissionWebhookMatchConditions(ctrl.GetConfigOrDie())
if err != nil {
setupLog.Error(err, "unable to check for feature gate AdmissionWebhookMatchConditions")
retcode = 1
return
}

if err = setupReconcilers(mgr, deploymentsNamespace, webhookServiceName, enableMetrics, enableTracing, alwaysAcceptAdmissionReviewsOnDeploymentsNamespace, featureGateAdmissionWebhookMatchConditions); err != nil {
Expand Down

0 comments on commit f05f8aa

Please sign in to comment.