From 51d9aa09f06da53c2e5f6363479d5f77233db73b Mon Sep 17 00:00:00 2001 From: minhtrannhat Date: Sat, 18 Jan 2025 12:00:00 -0500 Subject: [PATCH] chore(helm): add ingress configuration --- helm/incidentops/templates/ingress.yaml | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 helm/incidentops/templates/ingress.yaml diff --git a/helm/incidentops/templates/ingress.yaml b/helm/incidentops/templates/ingress.yaml new file mode 100644 index 0000000..b0e06e9 --- /dev/null +++ b/helm/incidentops/templates/ingress.yaml @@ -0,0 +1,55 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "incidentops.fullname" . }} + labels: + {{- include "incidentops.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: /api + pathType: Prefix + backend: + service: + name: {{ include "incidentops.fullname" . }}-api + port: + number: {{ .Values.api.port }} + - path: /v1 + pathType: Prefix + backend: + service: + name: {{ include "incidentops.fullname" . }}-api + port: + number: {{ .Values.api.port }} + - path: /healthz + pathType: Exact + backend: + service: + name: {{ include "incidentops.fullname" . }}-api + port: + number: {{ .Values.api.port }} + - path: /readyz + pathType: Exact + backend: + service: + name: {{ include "incidentops.fullname" . }}-api + port: + number: {{ .Values.api.port }} + - path: / + pathType: Prefix + backend: + service: + name: {{ include "incidentops.fullname" . }}-web + port: + number: {{ .Values.web.port }} +{{- end }}