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

fix: scope of webhook configurations #3676

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ var replacements = map[string]string{
- services/proxy
- nodes/proxy
- services/status
scope: '{{ .Values.mutatingWebhookScope }}'
{{- end }}`,

"HELMSUBST_MUTATING_WEBHOOK_CLIENT_CONFIG: \"\"": `{{- if .Values.mutatingWebhookURL }}
Expand Down Expand Up @@ -264,6 +265,7 @@ var replacements = map[string]string{
- 'nodes/proxy'
# For constraints that mitigate CVE-2020-8554
- 'services/status'
scope: '{{ .Values.validatingWebhookScope }}'
{{- end }}`,

"HELMSUBST_MUTATING_WEBHOOK_MATCH_CONDITIONS": `{{ toYaml .Values.mutatingWebhookMatchConditions | nindent 4 }}`,
Expand Down
2 changes: 2 additions & 0 deletions cmd/build/helmify/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ validatingWebhookMatchConditions: []
validatingWebhookCheckIgnoreFailurePolicy: Fail
validatingWebhookCustomRules: {}
validatingWebhookURL: null
validatingWebhookScope: '*'
enableDeleteOperations: false
enableConnectOperations: false
enableExternalData: true
Expand All @@ -34,6 +35,7 @@ mutatingWebhookMatchConditions: []
mutatingWebhookTimeoutSeconds: 1
mutatingWebhookCustomRules: {}
mutatingWebhookURL: null
mutatingWebhookScope: '*'
mutationAnnotations: false
auditChunkSize: 500
logLevel: INFO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ webhooks:
- services/proxy
- nodes/proxy
- services/status
scope: '{{ .Values.mutatingWebhookScope }}'
{{- end }}
sideEffects: None
timeoutSeconds: {{ .Values.mutatingWebhookTimeoutSeconds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ webhooks:
- 'nodes/proxy'
# For constraints that mitigate CVE-2020-8554
- 'services/status'
scope: '{{ .Values.validatingWebhookScope }}'
{{- end }}
sideEffects: None
timeoutSeconds: {{ .Values.validatingWebhookTimeoutSeconds }}
Expand Down
2 changes: 2 additions & 0 deletions manifest_staging/charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ validatingWebhookMatchConditions: []
validatingWebhookCheckIgnoreFailurePolicy: Fail
validatingWebhookCustomRules: {}
validatingWebhookURL: null
validatingWebhookScope: '*'
enableDeleteOperations: false
enableConnectOperations: false
enableExternalData: true
Expand All @@ -34,6 +35,7 @@ mutatingWebhookMatchConditions: []
mutatingWebhookTimeoutSeconds: 1
mutatingWebhookCustomRules: {}
mutatingWebhookURL: null
mutatingWebhookScope: '*'
mutationAnnotations: false
auditChunkSize: 500
logLevel: INFO
Expand Down
Loading