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

Webhook: Add labels & selectors. #364

Merged
merged 1 commit into from
Oct 26, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

- Templates: Add `controller.admissionWebhooks.patch.labels`. ([#360](https://github.com/giantswarm/nginx-ingress-controller-app/pull/360))
- Templates: Add `controller.admissionWebhooks.annotations`. ([#362](https://github.com/giantswarm/nginx-ingress-controller-app/pull/362))
- Webhook: Add labels & selectors. ([#364](https://github.com/giantswarm/nginx-ingress-controller-app/pull/364))

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 4 }}
app.kubernetes.io/component: admission-webhook
{{- with .Values.controller.admissionWebhooks.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "ingress-nginx.fullname" . }}-admission
webhooks:
- name: validate.nginx.ingress.kubernetes.io
Expand All @@ -36,4 +39,10 @@ webhooks:
{{- if .Values.controller.admissionWebhooks.timeoutSeconds }}
timeoutSeconds: {{ .Values.controller.admissionWebhooks.timeoutSeconds }}
{{- end }}
{{- if .Values.controller.admissionWebhooks.namespaceSelector }}
namespaceSelector: {{ toYaml .Values.controller.admissionWebhooks.namespaceSelector | nindent 6 }}
{{- end }}
{{- if .Values.controller.admissionWebhooks.objectSelector }}
objectSelector: {{ toYaml .Values.controller.admissionWebhooks.objectSelector | nindent 6 }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions helm/nginx-ingress-controller-app/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
"type": "string",
"enum": ["Ignore", "Fail"]
},
"labels": {
"type": "object"
},
"namespaceSelector": {
"type": "object"
},
"objectSelector": {
"type": "object"
},
"patch": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions helm/nginx-ingress-controller-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ controller:
timeoutSeconds: 10
failurePolicy: Fail
port: 8443
namespaceSelector: {}
objectSelector: {}
# -- Labels to be added to admission webhooks
labels: {}

service:
annotations: {}
Expand Down