Skip to content

Commit

Permalink
Chart: Add controller.progressDeadlineSeconds. (#12017)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrondT authored Sep 27, 2024
1 parent 8d6435b commit 7b8d293
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/ingress-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
| controller.podLabels | object | `{}` | Labels to add to the pod container metadata |
| controller.podSecurityContext | object | `{}` | Security context for controller pods |
| controller.priorityClassName | string | `""` | |
| controller.progressDeadlineSeconds | int | `0` | Specifies the number of seconds you want to wait for the controller deployment to progress before the system reports back that it has failed. Ref.: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds |
| controller.proxySetHeaders | object | `{}` | Will add custom headers before sending traffic to backends according to https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/custom-headers |
| controller.publishService | object | `{"enabled":true,"pathOverride":""}` | Allows customization of the source of the IP address or FQDN to report in the ingress status field. By default, it reads the information provided by the service. If disable, the status field reports the IP address of the node or nodes where an ingress controller pod is running. |
| controller.publishService.enabled | bool | `true` | Enable 'publishService' or not |
Expand Down
3 changes: 3 additions & 0 deletions charts/ingress-nginx/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
replicas: {{ .Values.controller.replicaCount }}
{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.controller.progressDeadlineSeconds }}
progressDeadlineSeconds: {{ .Values.controller.progressDeadlineSeconds }}
{{- end }}
{{- if .Values.controller.updateStrategy }}
strategy: {{ toYaml .Values.controller.updateStrategy | nindent 4 }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/ingress-nginx/tests/controller-deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,11 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: registry.k8s.io/ingress-nginx/controller:my-little-custom-tag@sha256:faa2d18687f734994b6bd9e309e7a73852a81c30e1b8f63165fcd4f0a087e3cd

- it: should create a Deployment with `progressDeadlineSeconds` if `controller.progressDeadlineSeconds` is set
set:
controller.progressDeadlineSeconds: 111
asserts:
- equal:
path: spec.progressDeadlineSeconds
value: 111
4 changes: 4 additions & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ controller:
# maxUnavailable: 1
# type: RollingUpdate

# -- Specifies the number of seconds you want to wait for the controller deployment to progress before the system reports back that it has failed.
# Ref.: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds
progressDeadlineSeconds: 0

# -- `minReadySeconds` to avoid killing pods before we are ready
##
minReadySeconds: 0
Expand Down

0 comments on commit 7b8d293

Please sign in to comment.