controller-configmap.yaml 1.1 KB

1234567891011121314151617181920212223242526272829
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. labels:
  5. {{- include "ingress-nginx.labels" . | nindent 4 }}
  6. app.kubernetes.io/component: controller
  7. {{- with .Values.controller.labels }}
  8. {{- toYaml . | nindent 4 }}
  9. {{- end }}
  10. {{- if .Values.controller.configAnnotations }}
  11. annotations: {{ toYaml .Values.controller.configAnnotations | nindent 4 }}
  12. {{- end }}
  13. name: {{ include "ingress-nginx.controller.fullname" . }}
  14. namespace: {{ .Release.Namespace }}
  15. data:
  16. allow-snippet-annotations: "{{ .Values.controller.allowSnippetAnnotations }}"
  17. {{- if .Values.controller.addHeaders }}
  18. add-headers: {{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-custom-add-headers
  19. {{- end }}
  20. {{- if or .Values.controller.proxySetHeaders .Values.controller.headers }}
  21. proxy-set-headers: {{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-custom-proxy-headers
  22. {{- end }}
  23. {{- if .Values.dhParam }}
  24. ssl-dh-param: {{ printf "%s/%s" .Release.Namespace (include "ingress-nginx.controller.fullname" .) }}
  25. {{- end }}
  26. {{- range $key, $value := .Values.controller.config }}
  27. {{- $key | nindent 2 }}: {{ $value | quote }}
  28. {{- end }}