diff --git a/deploy/kubernetes/charts/ui/templates/ingress.yaml b/deploy/kubernetes/charts/ui/templates/ingress.yaml index c1b22496e..dbf1e9df5 100644 --- a/deploy/kubernetes/charts/ui/templates/ingress.yaml +++ b/deploy/kubernetes/charts/ui/templates/ingress.yaml @@ -1,3 +1,6 @@ +{{- if and .Values.ingress.enabled .Values.ingresses }} + {{- fail "Cannot set both ingress.enabled and ingresses" }} +{{- end }} {{- if .Values.ingress.enabled -}} {{- $fullName := include "ui.fullname" . -}} {{- $svcPort := .Values.service.port -}} @@ -51,3 +54,59 @@ spec: number: {{ $svcPort }} {{- end }} {{- end }} +{{- if .Values.ingresses }} +{{- $fullName := include "ui.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- range .Values.ingresses }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }}-{{ .name }} + labels: + {{- include "ui.labels" $ | nindent 4 }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .className }} + ingressClassName: {{ .className }} + {{- end }} + {{- if .tls }} + tls: + {{- range .tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- if .hosts }} + {{- range .hosts }} + - host: {{ . | quote }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- else }} + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} +{{- end }} +{{- end }} diff --git a/deploy/kubernetes/charts/ui/values.yaml b/deploy/kubernetes/charts/ui/values.yaml index 5b6068b71..2f25b1daa 100644 --- a/deploy/kubernetes/charts/ui/values.yaml +++ b/deploy/kubernetes/charts/ui/values.yaml @@ -84,6 +84,23 @@ endpoints: ingress: enabled: false # className: "" + annotations: {} + # alb.ingress.kubernetes.io/scheme: internet-facing + # alb.ingress.kubernetes.io/target-type: ip + # alb.ingress.kubernetes.io/healthcheck-path: /actuator/health/liveness + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + hosts: [] + # - "chart-example.local" + +ingresses: [] + # - name: default + # className: "" + # hosts: [] + # annotations: {} + # tls: [] istio: enabled: false