diff --git a/index.yaml b/index.yaml index 661ccb7..8534fdb 100644 --- a/index.yaml +++ b/index.yaml @@ -3,12 +3,12 @@ entries: tatort: - apiVersion: v2 appVersion: 0.0.1 - created: "2025-03-06T16:53:37.58879+01:00" + created: "2025-03-06T17:04:47.974062+01:00" description: A Helm chart for Kubernetes - digest: 3e45a6e7493abd150c7c37b8da1e0faeb967cb1e9e344e0c07bfde84ca78fa2a + digest: 20f31bba9527e380fa2d197c9fa7dcfc13ac7bfe87709ae642c4052ecc3331d4 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-06T16:53:37.588366+01:00" +generated: "2025-03-06T17:04:47.973556+01:00" diff --git a/tatort-0.1.1.tgz b/tatort-0.1.1.tgz index e7af43e..f2dbebb 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 d58803d..c4e1565 100644 --- a/tatort/templates/ingress.yaml +++ b/tatort/templates/ingress.yaml @@ -1,43 +1,52 @@ -{{- $fullName := include "tatort.fullname" . -}} -{{- $servicePort := .Values.service.port -}} -{{- $ingressPath := .Values.ingress.path -}} -{{- $ingressPathType := .Values.ingress.pathtype -}} -apiVersion: networking.k8s.io/v1 +{{ $ingress := .Values.ingress }} +{{ if $ingress.enabled }} +{{ $serviceName := include "tatort.name" . }} +{{ $servicePort := .Values.service.externalPort }} +apiVersion: {{ include "tatort.ingress.apiVersion" . }} kind: Ingress metadata: - name: {{ $fullName }} + name: {{ include "tatort.fullname" . }} labels: - app: {{ template "tatort.name" . }} - chart: {{ template "tatort.chart" . }} - component: tatort - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- with .Values.ingress.annotations }} + 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" . }} annotations: -{{ toYaml . | indent 4 }} -{{- end }} + {{- 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 }} + {{- . | toYaml | nindent 4 }} + {{- end }} spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} {{- end }} -{{- end }} rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - pathType: {{ $ingressPathType }} - backend: - service: - name: {{ $fullName }} - port: - number: 4173 - {{- end }} + {{ range $host := $ingress.hosts }} + - host: {{ $host | quote }} + http: + paths: + - path: {{ $ingress.path }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + backend: + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + pathType: Prefix + {{- else }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{ end }} + {{ if $ingress.tls }} + tls: + {{- $ingress.tls | toYaml | nindent 4 }} + {{ end }} +{{ end }} diff --git a/tatort/values.yaml b/tatort/values.yaml index 94213ad..63aa7c4 100644 --- a/tatort/values.yaml +++ b/tatort/values.yaml @@ -22,20 +22,13 @@ service: endpoint: tatort.local ingress: - enabled: true - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + enabled: false + className: "" path: / - pathtype: ImplementationSpecific - hosts: [ tatort.local ] -# hosts: -# - host: tatort.local -# paths: -# - path: / -# pathType: ImplementationSpecific - - tls: [] + annotations: {} + hosts: + - tatort.innohub.local + tls: route: enabled: false