ingress new

This commit is contained in:
titver968
2025-03-06 16:53:51 +01:00
parent 90a1a65cab
commit cfdb21315a
5 changed files with 35 additions and 19 deletions

View File

@@ -2,5 +2,5 @@ apiVersion: v2
name: tatort
description: A Helm chart for Kubernetes
type: application
version: "0.1.0"
version: "0.1.1"
appVersion: "0.0.1"

View File

@@ -1,27 +1,43 @@
{{- 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" . }}
annotations: {{- toYaml .Values.ingress.annotations | nindent 4 }}
name: {{ $fullName }}
labels:
app: {{ template "tatort.name" . }}
chart: {{ template "tatort.chart" . }}
component: tatort
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $.Values.ingress.path }}
pathType: {{ $.Values.ingress.pathType }}
- path: {{ $ingressPath }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- toYaml .Values.ingress.tls | nindent 4 }}
number: 4173
{{- end }}