diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index bb13474a5d..2a3f06f577 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -170,6 +170,7 @@ Parameter | Description | Default `controller.affinity` | The affinity of the Ingress controller pods. | {} `controller.volumes` | The volumes of the Ingress controller pods. | [] `controller.volumeMounts` | The volumeMounts of the Ingress controller pods. | [] +`controller.initContainers` | InitContainers for the Ingress controller pods. | [] `controller.resources` | The resources of the Ingress controller pods. | {} `controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1 `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 diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index 487d1b65cf..413e25f095 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -156,4 +156,7 @@ spec: - -ready-status={{ .Values.controller.readyStatus.enable }} - -ready-status-port={{ .Values.controller.readyStatus.port }} - -enable-latency-metrics={{ .Values.controller.enableLatencyMetrics }} +{{- if .Values.controller.initContainers }} + initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }} +{{- end }} {{- end }} diff --git a/deployments/helm-chart/templates/controller-deployment.yaml b/deployments/helm-chart/templates/controller-deployment.yaml index 826d8c17c8..d2d1c172c0 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -154,4 +154,7 @@ spec: - -ready-status={{ .Values.controller.readyStatus.enable }} - -ready-status-port={{ .Values.controller.readyStatus.port }} - -enable-latency-metrics={{ .Values.controller.enableLatencyMetrics }} +{{- if .Values.controller.initContainers }} + initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }} +{{- end }} {{- end }} diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index 96f0c28afa..46efb8d0de 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -114,6 +114,12 @@ controller: # mountPath: /etc/nginx/conf.d/extra.conf # subPath: extra.conf + ## InitContainers for the Ingress controller pods. + initContainers: [] + # - name: init-container + # image: busybox:1.34 + # command: ['sh', '-c', 'echo this is initial setup!'] + ## The number of replicas of the Ingress controller deployment. replicaCount: 1 diff --git a/docs/content/installation/installation-with-helm.md b/docs/content/installation/installation-with-helm.md index 67a72c9703..5612ce2ba0 100644 --- a/docs/content/installation/installation-with-helm.md +++ b/docs/content/installation/installation-with-helm.md @@ -171,6 +171,7 @@ The following tables lists the configurable parameters of the NGINX Ingress cont |``controller.affinity`` | The affinity of the Ingress controller pods. | {} | |``controller.volumes`` | The volumes of the Ingress controller pods. | [] | |``controller.volumeMounts`` | The volumeMounts of the Ingress controller pods. | [] | +|``controller.initContainers`` | InitContainers for the Ingress controller pods. | [] |``controller.resources`` | The resources of the Ingress controller pods. | {} | |``controller.replicaCount`` | The number of replicas of the Ingress controller deployment. | 1 | |``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 |