diff --git a/charts/dremio_v2/templates/dremio-ingress.yaml b/charts/dremio_v2/templates/dremio-ingress.yaml new file mode 100644 index 00000000..389d620f --- /dev/null +++ b/charts/dremio_v2/templates/dremio-ingress.yaml @@ -0,0 +1,41 @@ +{{- if $.Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: dremio + labels: + app: dremio + {{- include "dremio.service.labels" $ | nindent 4 }} +{{- if .Values.ingress.labels }} +{{ toYaml $.Values.ingress.labels | indent 4 }} +{{- end }} + {{- if $.Values.ingress.annotations }} + annotations: + {{- range $key, $value := $.Values.ingress.annotations }} + {{ $key }}: {{ tpl $value $ | quote }} + {{- end }} + {{- end }} +{{- end }} +spec: + {{- if $.Values.ingress.ingressClassName }} + ingressClassName: {{ $.Values.ingress.ingressClassName }} + {{- end -}} +{{- if .Values.ingress.tls }} + tls: +{{ tpl (toYaml $.Values.ingress.tls) $ | indent 4 }} + rules: + {{- if $.Values.ingress.hosts }} + {{- range $.Values.ingress.hosts }} + - host: {{ .name }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: dremio-client + port: + number: {{ .port }} + {{- end -}} + {{- end -}} +{{- end }} diff --git a/charts/dremio_v2/values.yaml b/charts/dremio_v2/values.yaml index 475114f3..d7165d40 100644 --- a/charts/dremio_v2/values.yaml +++ b/charts/dremio_v2/values.yaml @@ -475,3 +475,25 @@ service: # https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod # imagePullSecrets: # - secretname + +# Dremio Ingress +# If needed services can be exposed with existing loadbalancer through an ingress, +# to do so please expose the service with a ClusterIP instead of LoadBalancer + +ingress: + enabled: false + ingressClassName: nginx + annotations: [] + hosts: + - name: dremio-client + port: 31010 + - name: dremio + port: 9047 + - name: dremio-flight + port: 32010 + tls: + - secretName: dremio-tls + hosts: + - dremio-client + - dremio + - dremio-flight