Remove hard-written default Ingress Annotations
Summary
Currently the ingress annotations are hard-written into the ingress.yaml files, which is not nice if you have specified the ingress controller prefix to something else than nginx.ingress.kubernetes.io. Also the ingress.class and provider annotations are not needed if you have a default class configured for your own ingress controller.
Configuration used
charts/gitlab/charts/unicorn/templates/ingress.yaml:
annotations:
kubernetes.io/ingress.class: "{{ template "gitlab.ingressclass" . }}"
kubernetes.io/ingress.provider: nginx
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.proxyBodySize | quote }}
nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .Values.ingress.proxyReadTimeout | quote }}
nginx.ingress.kubernetes.io/proxy-connect-timeout: {{ .Values.ingress.proxyConnectTimeout | quote }}
{{ include "gitlab.certmanager_annotations" . }}
{{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
Expected behavior
I expect that the ingress.yaml doesn't contain any hard-written annotations. Necessary annotations should be provided through the values.yaml in form of a range block. This way, the ingress.yaml files of the charts/subcharts should just contain:
{{ include "gitlab.certmanager_annotations" . }}
{{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
Edited by Max Schmidt