From b3a1473ad905ae4123ccced2f9e29317fddff86a Mon Sep 17 00:00:00 2001 From: pieter Date: Wed, 19 Nov 2025 11:03:19 +0000 Subject: [PATCH] =?UTF-8?q?templates/ingress.yaml=20=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/ingress.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 templates/ingress.yaml diff --git a/templates/ingress.yaml b/templates/ingress.yaml new file mode 100644 index 0000000..6e5f9af --- /dev/null +++ b/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "{{ .Chart.Name }}.fullname" . }} + labels: + {{- include "{{ .Chart.Name }}.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.ingress.annotations | nindent 4 }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "{{ .Chart.Name }}.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - secretName: {{ .secretName }} + hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + {{- end }} + {{- end }} +{{- end }}