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

Add object selector for provider type in the gardener-extension-admission-gcp webhook #397

Merged
merged 2 commits into from
Mar 8, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ webhooks:
- cloudprofiles
- shoots
failurePolicy: Fail
objectSelector: {}
objectSelector:
{{- if .Values.global.webhookConfig.useObjectSelector }}
matchLabels:
provider.extensions.gardener.cloud/gcp: "true"
{{- end }}
namespaceSelector: {}
sideEffects: None
admissionReviewVersions:
Expand Down
2 changes: 2 additions & 0 deletions charts/gardener-extension-admission-gcp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ global:
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
# Please make sure you are running `gardener@v1.42` or later before setting this to true.
useObjectSelector: false
# Kubeconfig to the target cluster. In-cluster configuration will be used if not specified.
kubeconfig:

Expand Down
5 changes: 4 additions & 1 deletion example/40-validatingwebhookconfiguration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ webhooks:
- cloudprofiles
- shoots
failurePolicy: Fail
objectSelector: {}
# Please make sure you are running `gardener@v1.42` or later before enabling this object selector.
objectSelector:
matchLabels:
provider.extensions.gardener.cloud/gcp: "true"
namespaceSelector: {}
sideEffects: None
admissionReviewVersions:
Expand Down