From c55c6cab6eeaa31abed73e981f530c55d601d23f Mon Sep 17 00:00:00 2001 From: pieter Date: Thu, 20 Nov 2025 07:55:24 +0000 Subject: [PATCH] =?UTF-8?q?templates/ingress.yaml=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/ingress.yaml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 6e5f9af..f681b12 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -2,18 +2,30 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "{{ .Chart.Name }}.fullname" . }} + name: {{ include "wordpress-nginx.fullname" . }} labels: - {{- include "{{ .Chart.Name }}.labels" . | nindent 4 }} + {{- include "wordpress-nginx.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} annotations: - {{- toYaml .Values.ingress.annotations | nindent 4 }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} rules: {{- range .Values.ingress.hosts }} - - host: {{ .host }} + - host: {{ .host | quote }} http: paths: {{- range .paths }} @@ -21,19 +33,9 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ include "{{ .Chart.Name }}.fullname" $ }} + name: {{ include "wordpress-nginx.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 }} +{{- end }} \ No newline at end of file