46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
{{- if .Values.ingress.enabled -}}
|
|
{{- $fullName := include "gitea.fullname" . -}}
|
|
{{- $httpPort := .Values.service.http.port -}}
|
|
apiVersion: networking.k8s.io/v1/Ingress
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels:
|
|
{{- include "gitea.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.ingress.annotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
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 }}
|
|
- path: {{ .path }}
|
|
{{- if .pathType }}
|
|
pathType: {{ .pathType }}
|
|
{{- end }}
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-http
|
|
port:
|
|
number: {{ $httpPort }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|