diff --git a/stable/nginx-ingress/Chart.yaml b/stable/nginx-ingress/Chart.yaml index 91e09779d9..c3de1efb50 100755 --- a/stable/nginx-ingress/Chart.yaml +++ b/stable/nginx-ingress/Chart.yaml @@ -1,5 +1,5 @@ name: nginx-ingress -version: 0.12.3 +version: 0.13.0 appVersion: 0.12.0 home: https://github.com/kubernetes/ingress-nginx description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration. diff --git a/stable/nginx-ingress/README.md b/stable/nginx-ingress/README.md index 4d02a8a188..2139229c63 100644 --- a/stable/nginx-ingress/README.md +++ b/stable/nginx-ingress/README.md @@ -54,6 +54,9 @@ Parameter | Description | Default `controller.defaultBackendService` | default 404 backend service; required only if `defaultBackend.enabled = false` | `""` `controller.electionID` | election ID to use for the status update | `ingress-controller-leader` `controller.extraEnvs` | any additional environment variables to set in the pods | `{}` +`controller.extraContainers` | Sidecar containers to add to the controller pod. See [LemonLDAP::NG controller](https://github.com/lemonldap-ng-controller/lemonldap-ng-controller) as example | `{}` +`controller.extraVolumeMounts` | Additional volumeMounts to the controller main container | `{}` +`controller.extraVolumes` | Additional volumes to the controller pod | `{}` `controller.ingressClass` | name of the ingress class to route through this controller | `nginx` `controller.scope.enabled` | limit the scope of the ingress controller | `false` (watch all namespaces) `controller.scope.namespace` | namespace to watch for ingress | `""` (use the release namespace) diff --git a/stable/nginx-ingress/templates/controller-daemonset.yaml b/stable/nginx-ingress/templates/controller-daemonset.yaml index 370ddbbfe3..a314712a4f 100644 --- a/stable/nginx-ingress/templates/controller-daemonset.yaml +++ b/stable/nginx-ingress/templates/controller-daemonset.yaml @@ -137,14 +137,22 @@ spec: timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} volumeMounts: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} - mountPath: /etc/nginx/template name: nginx-template-volume readOnly: true +{{- end }} +{{- if .Values.controller.extraVolumeMounts }} +{{ toYaml .Values.controller.extraVolumeMounts | indent 10}} {{- end }} resources: {{ toYaml .Values.controller.resources | indent 12 }} +{{- if .Values.controller.extraContainers }} +{{ toYaml .Values.controller.extraContainers | indent 8}} +{{- end }} hostNetwork: {{ .Values.controller.hostNetwork }} {{- if .Values.controller.nodeSelector }} nodeSelector: @@ -160,14 +168,19 @@ spec: {{- end }} serviceAccountName: {{ if .Values.rbac.create }}{{ template "nginx-ingress.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} terminationGracePeriodSeconds: 60 -{{- if .Values.controller.customTemplate.configMapName }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} volumes: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} - name: nginx-template-volume configMap: name: {{ .Values.controller.customTemplate.configMapName }} items: - key: {{ .Values.controller.customTemplate.configMapKey }} path: nginx.tmpl +{{- end }} +{{- if .Values.controller.extraVolumes }} +{{ toYaml .Values.controller.extraVolumes | indent 6}} {{- end }} updateStrategy: {{ toYaml .Values.controller.updateStrategy | indent 4 }} diff --git a/stable/nginx-ingress/templates/controller-deployment.yaml b/stable/nginx-ingress/templates/controller-deployment.yaml index 8bc5537f21..cf3f2998f5 100644 --- a/stable/nginx-ingress/templates/controller-deployment.yaml +++ b/stable/nginx-ingress/templates/controller-deployment.yaml @@ -132,14 +132,22 @@ spec: timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} -{{- if .Values.controller.customTemplate.configMapName }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts) }} volumeMounts: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} - mountPath: /etc/nginx/template name: nginx-template-volume readOnly: true +{{- end }} +{{- if .Values.controller.extraVolumeMounts }} +{{ toYaml .Values.controller.extraVolumeMounts | indent 10}} {{- end }} resources: {{ toYaml .Values.controller.resources | indent 12 }} +{{- if .Values.controller.extraContainers }} +{{ toYaml .Values.controller.extraContainers | indent 8}} +{{- end }} hostNetwork: {{ .Values.controller.hostNetwork }} {{- if .Values.controller.nodeSelector }} nodeSelector: @@ -155,8 +163,10 @@ spec: {{- end }} serviceAccountName: {{ if .Values.rbac.create }}{{ template "nginx-ingress.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} terminationGracePeriodSeconds: 60 -{{- if .Values.controller.customTemplate.configMapName }} +{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumes) }} volumes: +{{- end }} +{{- if .Values.controller.customTemplate.configMapName }} - name: nginx-template-volume configMap: name: {{ .Values.controller.customTemplate.configMapName }} @@ -164,4 +174,7 @@ spec: - key: {{ .Values.controller.customTemplate.configMapKey }} path: nginx.tmpl {{- end }} +{{- if .Values.controller.extraVolumes }} +{{ toYaml .Values.controller.extraVolumes | indent 6}} +{{- end }} {{- end }} diff --git a/stable/nginx-ingress/values.yaml b/stable/nginx-ingress/values.yaml index 091f4362b6..b739f7ab7e 100644 --- a/stable/nginx-ingress/values.yaml +++ b/stable/nginx-ingress/values.yaml @@ -178,6 +178,40 @@ controller: http: "" https: "" + extraContainers: {} + ## Additional containers to be added to the controller pod. + ## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. + # - name: my-sidecar + # image: nginx:latest + # - name: lemonldap-ng-controller + # image: lemonldapng/lemonldap-ng-controller:0.2.0 + # args: + # - /lemonldap-ng-controller + # - --alsologtostderr + # - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration + # env: + # - name: POD_NAME + # valueFrom: + # fieldRef: + # fieldPath: metadata.name + # - name: POD_NAMESPACE + # valueFrom: + # fieldRef: + # fieldPath: metadata.namespace + # volumeMounts: + # - name: copy-portal-skins + # mountPath: /srv/var/lib/lemonldap-ng/portal/skins + + extraVolumeMounts: {} + ## Additional volumeMounts to the controller main container. + # - name: copy-portal-skins + # mountPath: /var/lib/lemonldap-ng/portal/skins + + extraVolumes: {} + ## Additional volumes to the controller pod. + # - name: copy-portal-skins + # emptyDir: {} + stats: enabled: false