oc-k8s/opencloud/charts/loki/templates/ingress.yaml

41 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-12-16 14:55:43 +01:00
{{- if .Values.ingress.enabled }}
{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}}
apiVersion: {{ include "loki.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "loki.fullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $.Values.ingress.hosts }}
- host: {{ tpl . $ | quote }}
http:
paths:
{{- include "loki.ingress.servicePaths" $ | indent 10}}
{{- end }}
{{- end }}