From e433cd24e3ca2e6c71ff35c5a6b8c2a7c380fa69 Mon Sep 17 00:00:00 2001 From: pieter Date: Wed, 3 Dec 2025 10:50:49 +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 | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 6e5f9af..18be06d 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -1,19 +1,31 @@ -{{- if .Values.ingress.enabled }} +{{- if .Values.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "{{ .Chart.Name }}.fullname" . }} + name: {{ include "yourls-nginx.fullname" . }} labels: - {{- include "{{ .Chart.Name }}.labels" . | nindent 4 }} + {{- include "yourls-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 "yourls-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