8000 allow init containers, e.g. to deploy a crl file to nginx (#2100) · nginx/kubernetes-ingress@3770c0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 3770c0a

Browse files
authored
allow init containers, e.g. to deploy a crl file to nginx (#2100)
* allow init containers, e.g. to deploy a crl file to nginx * - updated daemonset.yaml and fixed deployment.yaml - consistent doc info - example for initContainers * - updated daemonset.yaml and fixed deployment.yaml - consistent doc info - example for initContainers * more generic description an sample
1 parent 5643f78 commit 3770c0a

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

deployments/helm-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ Parameter | Description | Default
170170
`controller.affinity` | The affinity of the Ingress controller pods. | {}
171171
`controller.volumes` | The volumes of the Ingress controller pods. | []
172172
`controller.volumeMounts` | The volumeMounts of the Ingress controller pods. | []
173+
`controller.initContainers` | InitContainers for the Ingress controller pods. | []
173174
`controller.resources` | The resources of the Ingress controller pods. | {}
174175
`controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1
175176
`controller.ingressClass` | A class of the Ingress controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,7 @@ spec:
156156
- -ready-status={{ .Values.controller.readyStatus.enable }}
157157
- -ready-status-port={{ .Values.controller.readyStatus.port }}
158158
- -enable-latency-metrics={{ .Values.controller.enableLatencyMetrics }}
159+
{{- if .Values.controller.initContainers }}
160+
initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }}
161+
{{- end }}
159162
{{- end }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,7 @@ spec:
154154
- -ready-status={{ .Values.controller.readyStatus.enable }}
155155
- -ready-status-port={{ .Values.controller.readyStatus.port }}
156156
- -enable-latency-metrics={{ .Values.controller.enableLatencyMetrics }}
157+
{{- if .Values.controller.initContainers }}
158+
initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }}
159+
{{- end }}
157160
{{- end }}

deployments/helm-chart/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ controller:
114114
# mountPath: /etc/nginx/conf.d/extra.conf
115115
# subPath: extra.conf
116116

117+
## InitContainers for the Ingress controller pods.
118+
initContainers: []
119+
# - name: init-container
120+
# image: busybox:1.34
121+
# command: ['sh', '-c', 'echo this is initial setup!']
122+
117123
## The number of replicas of the Ingress controller deployment.
118124
replicaCount: 1
119125

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ The following tables lists the configurable parameters of the NGINX Ingress cont
171171
|``controller.affinity`` | The affinity of the Ingress controller pods. | {} |
172172
|``controller.volumes`` | The volumes of the Ingress controller pods. | [] |
173173
|``controller.volumeMounts`` | The volumeMounts of the Ingress controller pods. | [] |
174+
|``controller.initContainers`` | InitContainers for the Ingress controller pods. | []
174175
|``controller.resources`` | The resources of the Ingress controller pods. | {} |
175176
|``controller.replicaCount`` | The number of replicas of the Ingress controller deployment. | 1 |
176177
|``controller.ingressClass`` | A class of the Ingress controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx |

0 commit comments

Comments
 (0)
0