Skip to content

Commit

Permalink
Deployment: Implement controller.podAnnotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gacko committed Mar 14, 2023
1 parent 3ad420a commit a642409
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s
- Deployment: Implement `controller.labels`.
- Deployment: Implement `controller.annotations`.
- Deployment: Implement `revisionHistoryLimit`.
- Deployment: Implement `controller.podAnnotations`.

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ spec:
minReadySeconds: {{ .Values.controller.minReadySeconds }}
template:
metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 8 }}
app.kubernetes.io/component: controller
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
{{- range .Values.controller.extraAnnotations.pod }}
{{- range .Values.controller.extraAnnotations.pod }}
{{ . }}
{{- end }}
{{- end }}
{{- if .Values.controller.podAnnotations }}
{{- range $key, $value := .Values.controller.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "ingress-nginx.labels" . | nindent 8 }}
app.kubernetes.io/component: controller
spec:
affinity:
{{- with .Values.controller.nodeAffinity }}
Expand Down
3 changes: 3 additions & 0 deletions helm/nginx-ingress-controller-app/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@
"nodeAffinity": {
"type": ["object", "null"]
},
"podAnnotations": {
"type": "object"
},
"proxySetHeaders": {
"type": "object"
},
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 @@ -293,6 +293,10 @@ controller:
# description: Too many 4XXs
# summary: More than 5% of all requests returned 4XX, this requires your attention

# -- Annotations to be added to controller pods
##
podAnnotations: {}

# controller.resources
resources:

Expand Down

0 comments on commit a642409

Please sign in to comment.