Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - Switching Helm Webhooks #1528

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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