{{- if .Values.ingress.enabled -}} {{- $serviceName := print (include "semaphoreui.fullname" .) }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "semaphoreui.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{- include "semaphoreui.labels" . | nindent 4 }} {{- if .Values.ingress.labels }} {{- toYaml .Values.ingress.labels | nindent 4 }} {{- end }} {{- if .Values.ingress.annotations }} annotations: {{- toYaml .Values.ingress.annotations | nindent 4 }} {{- end }} spec: {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} - secretName: {{ .secretName }} {{- if .hosts }} hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} {{- end }} {{- end }} {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .host }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ $serviceName }} port: name: http {{- end }} {{- end }} {{- end }}