Skip to content

Commit bf67929

Browse files
authored
Add lifecycle for controller container to helm chart (#3005)
1 parent df6ed7c commit bf67929

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

deployments/helm-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Parameter | Description | Default
159159
`controller.image.repository` | The image repository of the Ingress Controller. | nginx/nginx-ingress
160160
`controller.image.tag` | The tag of the Ingress Controller image. | 2.3.0
161161
`controller.image.pullPolicy` | The pull policy for the Ingress Controller image. | IfNotPresent
162+
`controller.lifecycle` | The lifecycle of the Ingress Controller pods. | {}
162163
`controller.config.name` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated
163164
`controller.config.annotations` | The annotations of the Ingress Controller configmap. | {}
164165
`controller.config.entries` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {}

deployments/helm-chart/templates/controller-daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ spec:
7272
- name: {{ include "nginx-ingress.name" . }}
7373
image: {{ include "nginx-ingress.image" . }}
7474
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
75+
{{- if .Values.controller.lifecycle }}
76+
lifecycle:
77+
{{ toYaml .Values.controller.lifecycle | indent 10 }}
78+
{{- end }}
7579
ports:
7680
- name: http
7781
containerPort: 80

deployments/helm-chart/templates/controller-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ spec:
7777
- image: {{ include "nginx-ingress.image" . }}
7878
name: {{ include "nginx-ingress.name" . }}
7979
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
80+
{{- if .Values.controller.lifecycle }}
81+
lifecycle:
82+
{{ toYaml .Values.controller.lifecycle | indent 10 }}
83+
{{- end }}
8084
ports:
8185
- name: http
8286
containerPort: 80

deployments/helm-chart/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ controller:
5858
## The pull policy for the Ingress Controller image.
5959
pullPolicy: IfNotPresent
6060

61+
## The lifecycle of the Ingress Controller pods.
62+
lifecycle: {}
63+
6164
config:
6265
## The name of the ConfigMap used by the Ingress Controller.
6366
## Autogenerated if not set or set to "".

docs/content/installation/installation-with-helm.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
163163
|``controller.image.digest`` | The digest of the Ingress Controller image. Digest has precedence over tag | None |
164164
|``controller.image.tag`` | The tag of the Ingress Controller image. | 2.3.0 |
165165
|``controller.image.pullPolicy`` | The pull policy for the Ingress Controller image. | IfNotPresent |
166+
|``controller.lifecycle`` | The lifecycle of the Ingress Controller pods. | {} |
166167
|``controller.config.name`` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated |
167168
|``controller.config.entries`` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {} |
168169
|``controller.customPorts`` | A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. | [] |

0 commit comments

Comments
 (0)