2019-12-12 13:38:31 -05:00
|
|
|
{{- if .Values.ingress.enabled }}
|
|
|
|
apiVersion: {{ template "gitea.ingress.apiVersion" . }}
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: "{{ template "fullname" . }}"
|
|
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
|
|
release: {{ .Release.Name | quote }}
|
|
|
|
heritage: {{ .Release.Service | quote }}
|
|
|
|
annotations:
|
|
|
|
{{- if .Values.ingress.certManager }}
|
|
|
|
kubernetes.io/tls-acme: "true"
|
|
|
|
{{- end }}
|
|
|
|
{{- range $key, $value := .Values.ingress.annotations }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
rules:
|
|
|
|
{{- if .Values.ingress.hostname }}
|
|
|
|
- host: {{ .Values.ingress.hostname }}
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: {{ template "fullname" . }}-http
|
|
|
|
servicePort: {{ .Values.service.http.port }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range .Values.ingress.hosts }}
|
|
|
|
- host: {{ .name }}
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: {{ default "/" .path }}
|
|
|
|
backend:
|
|
|
|
serviceName: "{{ template "fullname" $ }}"-http
|
2020-04-27 19:54:21 +02:00
|
|
|
servicePort: {{ $.Values.service.http.port }}
|
2019-12-12 13:38:31 -05:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.ingress.tls }}
|
|
|
|
tls:
|
|
|
|
{{ toYaml .Values.ingress.tls | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|