diff --git a/index.yaml b/index.yaml index 89905ef..a7292a3 100644 --- a/index.yaml +++ b/index.yaml @@ -3,12 +3,12 @@ entries: tatort: - apiVersion: v2 appVersion: 0.0.1 - created: "2025-03-07T08:56:10.227617+01:00" + created: "2025-03-07T09:02:19.086473+01:00" description: A Helm chart for Kubernetes - digest: eb4ba242257cb5c08abfd69865fcd6d8b04822ca039464281d8ab2ce8c0ccc56 + digest: 3bd2bda018e0c47d5752c34e4cc215ac2e46582005376f4fa101da1c7e1bb1bf name: tatort type: application urls: - https://gitea.innohub.local:3000/innohub/charts/raw/main/tatort-0.1.1.tgz version: 0.1.1 -generated: "2025-03-07T08:56:10.227278+01:00" +generated: "2025-03-07T09:02:19.086143+01:00" diff --git a/ingress.yaml b/ingress.yaml index 795c1af..a3088e3 100644 --- a/ingress.yaml +++ b/ingress.yaml @@ -13,9 +13,9 @@ metadata: component: tatort heritage: {{ .Release.Service }} release: {{ .Release.Name }} +{{- with .Values.ingress.annotations }} annotations: - {{- with .Values.ingress.annotations }} -# {{- with $ingress.annotations }} + {{- with $ingress.annotations }} {{- . | toYaml | niindent 4 }} {{- end }} spec: diff --git a/tatort-0.1.1.tgz b/tatort-0.1.1.tgz index 1c8735b..905ece7 100644 Binary files a/tatort-0.1.1.tgz and b/tatort-0.1.1.tgz differ diff --git a/tatort/templates/ingress.yaml b/tatort/templates/ingress.yaml index de915c2..87be322 100644 --- a/tatort/templates/ingress.yaml +++ b/tatort/templates/ingress.yaml @@ -1,50 +1,45 @@ -{{ $ingress := .Values.ingress }} -{{ if $ingress.enabled }} +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "tatort.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +{{- $ingressPath := .Values.ingress.path -}} +{{- $ingressPathType := .Values.ingress.pathtype -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "tatort.fullname" . }} + name: {{ $fullName }} labels: - app.kubernetes.io/name: {{ include "tatort.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - helm.sh/chart: {{ include "tatort.chart" . }} + app: {{ template "tatort.name" . }} + chart: {{ template "tatort.chart" . }} + component: tatort + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} annotations: - {{- if .Values.ingress.tls }} - nginx.ingress.kubernetes.io/ssl-redirect: "true" - kubernetes.io/tls-acme: "true" - {{- else }} - nginx.ingress.kubernetes.io/ssl-redirect: "false" - {{- end }} - {{- with $ingress.annotations }} + {{- with .Values.ingress.annotations }} {{- . | toYaml | nindent 4 }} {{- end }} spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - rules: - {{ range $host := $ingress.hosts }} - - host: {{ $host | quote }} - http: - paths: - - path: {{ $ingress.path }} - {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} - backend: - service: - name: http - port: - number: 4173 - pathType: Prefix - {{- else }} - backend: - serviceName: http - servicePort: 4173 - {{- end }} - {{ end }} - {{ if $ingress.tls }} +{{- if .Values.ingress.tls }} tls: - {{- $ingress.tls | toYaml | nindent 4 }} - {{ end }} -{{ end }} + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + pathType: {{ $ingressPathType }} + backend: + service: + name: {{ $fullName }} + port: + number: 4173 + {{- end }} +{{- end }}