ingress.yaml onto right pfad

This commit is contained in:
titver968
2025-03-07 09:04:20 +01:00
parent 272419a872
commit 110f1a88cd
4 changed files with 40 additions and 45 deletions

View File

@@ -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"

View File

@@ -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:

Binary file not shown.

View File

@@ -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 }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{ range $host := $ingress.hosts }}
- host: {{ $host | quote }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingress.path }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
- path: {{ $ingressPath }}
pathType: {{ $ingressPathType }}
backend:
service:
name: http
name: {{ $fullName }}
port:
number: 4173
pathType: Prefix
{{- else }}
backend:
serviceName: http
servicePort: 4173
{{- end }}
{{ end }}
{{ if $ingress.tls }}
tls:
{{- $ingress.tls | toYaml | nindent 4 }}
{{ end }}
{{ end }}
{{- end }}