blob: ddbcf7fdb618ac1c0a5d01d3196c53a10622c335 [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- if .Values.ingress.enabled }}
2{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}}
3apiVersion: {{ include "loki.ingress.apiVersion" . }}
4kind: Ingress
5metadata:
6 name: {{ include "loki.fullname" . }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -03007 namespace: {{ $.Release.Namespace }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00008 labels:
9 {{- include "loki.labels" . | nindent 4 }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -030010 {{- with .Values.ingress.labels }}
11 {{- toYaml . | nindent 4 }}
12 {{- end }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000013 {{- with .Values.ingress.annotations }}
14 annotations:
15 {{- toYaml . | nindent 4 }}
16 {{- end }}
17spec:
18 {{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }}
19 ingressClassName: {{ .Values.ingress.ingressClassName }}
20 {{- end -}}
21 {{- if .Values.ingress.tls }}
22 tls:
23 {{- range .Values.ingress.tls }}
24 - hosts:
25 {{- range .hosts }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -030026 - {{ tpl . $ | quote }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000027 {{- end }}
28 {{- with .secretName }}
29 secretName: {{ . }}
30 {{- end }}
31 {{- end }}
32 {{- end }}
33 rules:
34 {{- range $.Values.ingress.hosts }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -030035 - host: {{ tpl . $ | quote }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000036 http:
37 paths:
38 {{- include "loki.ingress.servicePaths" $ | indent 10}}
39 {{- end }}
40{{- end }}