diff --git a/README.md b/README.md index 61dd7d8..7ffe82b 100644 --- a/README.md +++ b/README.md @@ -508,7 +508,8 @@ Annotations can be added to the Gitea pod. |ingress.hosts[0].host | add hosts for ingress | git.example.com | |ingress.hosts[0].paths[0].path | add path for each ingress host | / | |ingress.hosts[0].paths[0].pathType | add ingress path type | Prefix | -|ingress.tls|add ingress tls settings|[]| +|ingress.tls| add ingress tls settings|[]| +|ingress.className| add ingress class name. Only used in k8s 1.19+ | | ### Service diff --git a/templates/gitea/ingress.yaml b/templates/gitea/ingress.yaml index e7cb645..2af0804 100644 --- a/templates/gitea/ingress.yaml +++ b/templates/gitea/ingress.yaml @@ -18,6 +18,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: +{{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} +{{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} diff --git a/values.yaml b/values.yaml index 554699a..99e58e2 100644 --- a/values.yaml +++ b/values.yaml @@ -57,6 +57,7 @@ service: ingress: enabled: false + # className: nginx annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true"