forgejo-helm/templates/gitea/ingress.yaml
joshuachp a5bfb2f53c fix(ingress): apiVersion should be networking.k8s.io/v1 (#1056)
The `apiVersion` should be `networking.k8s.io/v1`

Reviewed-on: https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/1056
Co-authored-by: joshuachp <joshuachp@noreply.code.forgejo.org>
Co-committed-by: joshuachp <joshuachp@noreply.code.forgejo.org>
2025-01-16 13:16:47 +00:00

45 lines
1.2 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "gitea.fullname" . -}}
apiVersion: networking.k8s.io/v1
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:
name: http
{{- end }}
{{- end }}
{{- end }}