42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
{{- if .Values.ingress.enabled -}}
|
|
{{- $fullName := include "gitea.fullname" . -}}
|
|
{{- $httpPort := .Values.service.http.port -}}
|
|
{{- $pathType := .Values.ingress.pathType -}}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
labels:
|
|
{{- include "gitea.labels" . | nindent 4 }}
|
|
{{- template "ingress.annotations" . }}
|
|
spec:
|
|
{{- if .Values.ingress.className }}
|
|
ingressClassName: {{ tpl .Values.ingress.className . }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
{{- range .Values.ingress.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ tpl . $ | quote }}
|
|
{{- end }}
|
|
secretName: {{ .secretName }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.ingress.hosts }}
|
|
- host: {{ tpl .host $ | quote }}
|
|
http:
|
|
paths:
|
|
{{- range (.paths | default (list "/")) }}
|
|
- path: {{ . }}
|
|
pathType: {{ $pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-http
|
|
port:
|
|
number: {{ $httpPort }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|