diff --git a/backend/charts/lfx-v2-initiatives-service/templates/ingress.yaml b/backend/charts/lfx-v2-initiatives-service/templates/ingress.yaml new file mode 100644 index 00000000..fa46964e --- /dev/null +++ b/backend/charts/lfx-v2-initiatives-service/templates/ingress.yaml @@ -0,0 +1,40 @@ +{{- /* +Copyright The Linux Foundation and each contributor to LFX. +SPDX-License-Identifier: MIT +*/ -}} +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "lfx-v2-initiatives-service.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "lfx-v2-initiatives-service.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- toYaml .Values.ingress.tls | nindent 4 }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "lfx-v2-initiatives-service.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }}