{{- if .Values.ingress.enabled -}} {{- $fullName := include "streifencheck.fullname" . -}} {{- $servicePort := .Values.service.port -}} {{- $ingressPath := .Values.ingress.path -}} {{- $ingressPathType := .Values.ingress.pathtype -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} labels: app: {{ template "streifencheck.name" . }} chart: {{ template "streifencheck.chart" . }} component: streifencheck heritage: {{ .Release.Service }} release: {{ .Release.Name }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} {{- end }} spec: {{- if .Values.ingress.tls }} tls: {{- 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: 3000 {{- end }} {{- end }}