Skip to content

Commit

Permalink
Add lifecycle for controller container to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbry95 committed Sep 12, 2022
1 parent 57cae26 commit 5cf017b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployments/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Parameter | Description | Default
`controller.image.repository` | The image repository of the Ingress Controller. | nginx/nginx-ingress
`controller.image.tag` | The tag of the Ingress Controller image. | 2.3.0
`controller.image.pullPolicy` | The pull policy for the Ingress Controller image. | IfNotPresent
`controller.lifecycle` | The lifecycle of the Ingress Controller pods. | {}
`controller.config.name` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated
`controller.config.annotations` | The annotations of the Ingress Controller configmap. | {}
`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. | {}
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
- name: {{ include "nginx-ingress.name" . }}
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
{{- if .Values.controller.lifecycle }}
lifecycle:
{{ toYaml .Values.controller.lifecycle | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
name: {{ include "nginx-ingress.name" . }}
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
{{- if .Values.controller.lifecycle }}
lifecycle:
{{ toYaml .Values.controller.lifecycle | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
Expand Down
3 changes: 3 additions & 0 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ controller:
## The pull policy for the Ingress Controller image.
pullPolicy: IfNotPresent

## The lifecycle of the Ingress Controller pods.
lifecycle: {}

config:
## The name of the ConfigMap used by the Ingress Controller.
## Autogenerated if not set or set to "".
Expand Down
1 change: 1 addition & 0 deletions docs/content/installation/installation-with-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
|``controller.image.repository`` | The image repository of the Ingress Controller. | nginx/nginx-ingress |
|``controller.image.tag`` | The tag of the Ingress Controller image. | 2.3.0 |
|``controller.image.pullPolicy`` | The pull policy for the Ingress Controller image. | IfNotPresent |
|``controller.lifecycle`` | The lifecycle of the Ingress Controller pods. | {} |
|``controller.config.name`` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated |
|``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. | {} |
|``controller.customPorts`` | A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. | [] |
Expand Down

0 comments on commit 5cf017b

Please sign in to comment.