| {{ if .Values.gitBackend.ingress.enabled -}} |
| apiVersion: extensions/v1beta1 |
| kind: Ingress |
| metadata: |
| name: {{ .Release.Name }}-git-backend-ingress |
| labels: |
| app: git-backend |
| chart: {{ template "gerrit-slave.chart" . }} |
| heritage: {{ .Release.Service }} |
| release: {{ .Release.Name }} |
| annotations: |
| nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.gitBackend.ingress.maxBodySize | default "50m" }} |
| {{- if .Values.gitBackend.ingress.additionalAnnotations }} |
| {{ toYaml .Values.gitBackend.ingress.additionalAnnotations | indent 4 }} |
| {{- end }} |
| spec: |
| {{ if .Values.gitBackend.ingress.tls.enabled -}} |
| tls: |
| - hosts: |
| - {{ .Values.gitBackend.ingress.host }} |
| secretName: {{ .Release.Name }}-git-backend-tls-secret |
| {{- end }} |
| rules: |
| - host: {{ .Values.gitBackend.ingress.host }} |
| http: |
| paths: |
| - backend: |
| serviceName: {{ .Release.Name }}-git-backend-service |
| servicePort: {{ .Values.gitBackend.service.http.port }} |
| # TODO: Allow encrypted communication between Ingress and Service |
| # A possible solution could be the annotation |
| # nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream |
| {{- end }} |