mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Support to add-header configmap for Nginx-ingress (#2902)
This commit is contained in:
committed by
Reinhard Nägele
parent
9687a21c8a
commit
eaa3b3c3d0
@@ -1,5 +1,5 @@
|
||||
name: nginx-ingress
|
||||
version: 0.8.20
|
||||
version: 0.8.21
|
||||
appVersion: 0.9.0-beta.15
|
||||
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
|
||||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
|
||||
|
||||
@@ -88,6 +88,7 @@ Parameter | Description | Default
|
||||
`controller.stats.service.type` | type of controller stats service to create | `ClusterIP`
|
||||
`controller.customTemplate.configMapName` | configMap containing a custom nginx template | `""`
|
||||
`controller.customTemplate.configMapKey` | configMap key containing the nginx template | `""`
|
||||
`controller.headers` | configMap key:value pairs containing the [custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers) for Nginx | `{}`
|
||||
`defaultBackend.name` | name of the default backend component | `default-backend`
|
||||
`defaultBackend.image.repository` | default backend container image repository | `gcr.io/google_containers/defaultbackend`
|
||||
`defaultBackend.image.tag` | default backend container image tag | `1.3`
|
||||
|
||||
@@ -10,6 +10,9 @@ metadata:
|
||||
name: {{ template "nginx-ingress.controller.fullname" . }}
|
||||
data:
|
||||
enable-vts-status: "{{ .Values.controller.stats.enabled }}"
|
||||
{{- if .Values.controller.headers }}
|
||||
proxy-set-headers: {{ .Release.Namespace }}/{{ template "nginx-ingress.fullname" . }}-custom-headers
|
||||
{{- end }}
|
||||
{{- if .Values.controller.config }}
|
||||
{{ toYaml .Values.controller.config | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- if .Values.controller.headers }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "nginx-ingress.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.controller.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "nginx-ingress.fullname" . }}-custom-headers
|
||||
data:
|
||||
{{ toYaml .Values.controller.headers | indent 2 }}
|
||||
{{- end }}
|
||||
@@ -9,6 +9,8 @@ controller:
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
config: {}
|
||||
# Will add custom header to Nginx https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers
|
||||
headers: {}
|
||||
|
||||
# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm),
|
||||
# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920
|
||||
|
||||
Reference in New Issue
Block a user