Skip to content

Commit

Permalink
[FEATURE] - Switching Helm Webhooks
Browse files Browse the repository at this point in the history
Moving over to the helm managed webhooks by default and will deprecate the legacy ones
  • Loading branch information
gambol99 committed Oct 17, 2024
1 parent be380b3 commit a704520
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/terranetes-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions test/e2e/integration/setup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -54,8 +52,6 @@ EOF

cat << EOF > ${BATS_TMPDIR}/my_values.yaml
controller:
enableControllerWebhookRegistration: false
enableHelmWebhookRegistration: true
enableNamespaceProtection: true
costs:
secret: infracost-api
Expand All @@ -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 ]]
}

Expand Down

0 comments on commit a704520

Please sign in to comment.