diff --git a/charts/terranetes-controller/values.yaml b/charts/terranetes-controller/values.yaml index dd3e807f2..32fd8e5ed 100644 --- a/charts/terranetes-controller/values.yaml +++ b/charts/terranetes-controller/values.yaml @@ -73,10 +73,10 @@ controller: enableWatchers: true ## Indicates we should forgo the controller registering it's own webhooks and allowing ## helm to manage the webhooks for us - enableHelmWebhookRegistration: false + enableHelmWebhookRegistration: true ## indicates if the controller should register the validation and mutation webhooks ## for the Configuration, Revision and CloudResource resources - enableControllerWebhookRegistration: true + enableControllerWebhookRegistration: false # indicates if namespace deletion should be blocked if the namespace contains one # or more Configuration resources, forcing the user to delete correctly enableNamespaceProtection: false diff --git a/test/e2e/integration/setup.bats b/test/e2e/integration/setup.bats index 95b2a10a3..b9b279370 100644 --- a/test/e2e/integration/setup.bats +++ b/test/e2e/integration/setup.bats @@ -39,8 +39,6 @@ teardown() { cat << EOF > ${BATS_TMPDIR}/my_values.yaml replicaCount: 2 controller: - enableControllerWebhookRegistration: false - enableHelmWebhookRegistration: true enableNamespaceProtection: true images: controller: "ghcr.io/appvia/terranetes-controller:${VERSION}" @@ -54,8 +52,6 @@ EOF cat << EOF > ${BATS_TMPDIR}/my_values.yaml controller: - enableControllerWebhookRegistration: false - enableHelmWebhookRegistration: true enableNamespaceProtection: true costs: secret: infracost-api @@ -82,7 +78,12 @@ EOF } @test "We should have the controller webhooks enabled" { - runit "kubectl get validatingwebhookconfigurations validating-webhook-configuration" + runit "kubectl get validatingwebhookconfigurations terranetes-controller" + [[ $status -eq 0 ]] +} + +@test "We should have a mutating webhook for the controller" { + runit "kubectl get mutatingwebhookconfigurations terranetes-controller" [[ $status -eq 0 ]] }