Skip to content

Commit abf5b07

Browse files
author
7va
committed
fix /grafana path
1 parent 19bec24 commit abf5b07

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

helm/templates/ingress.yaml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,40 @@
22
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:
5-
name: {{ include "opensampl.fullname" . }}
5+
name: {{ include "opensampl.fullname" . }}-ingress
6+
labels:
7+
{{- include "opensampl.labels" . | nindent 4 }}
8+
{{- with .Values.ingress.annotations }}
69
annotations:
7-
{{- toYaml .Values.ingress.annotations | nindent 4 }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
812
spec:
13+
{{- if .Values.ingress.className }}
914
ingressClassName: {{ .Values.ingress.className }}
15+
{{- end }}
16+
{{- if .Values.ingress.tls }}
1017
tls:
11-
{{- toYaml .Values.ingress.tls | nindent 4 }}
18+
{{- range .Values.ingress.tls }}
19+
- hosts:
20+
{{- range .hosts }}
21+
- {{ . | quote }}
22+
{{- end }}
23+
secretName: {{ .secretName }}
24+
{{- end }}
25+
{{- end }}
1226
rules:
13-
- host: {{ (index .Values.ingress.hosts 0).host }}
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ .host | quote }}
1429
http:
1530
paths:
16-
- path: /api(/|$)(.*)
17-
pathType: Prefix
31+
{{- range .paths }}
32+
- path: {{ .path }}
33+
pathType: {{ .pathType }}
1834
backend:
1935
service:
20-
name: {{ include "opensampl.fullname" . }}-backend
36+
name: {{ include "opensampl.fullname" $ }}-{{ .service }}
2137
port:
22-
number: {{ .Values.backend.service.port }}
23-
24-
- path: /grafana(/|$)(.*)
25-
pathType: Prefix
26-
backend:
27-
service:
28-
name: {{ include "opensampl.fullname" . }}-grafana
29-
port:
30-
number: {{ .Values.grafana.port }}
31-
32-
- path: /
33-
pathType: Prefix
34-
backend:
35-
service:
36-
name: {{ include "opensampl.fullname" . }}-backend
37-
port:
38-
number: {{ .Values.backend.service.port }}
39-
{{- end }}
38+
number: {{ if eq .service "backend" }}{{ $.Values.backend.service.port }}{{ else }}{{ $.Values.grafana.port }}{{ end }}
39+
{{- end }}
40+
{{- end }}
41+
{{- end }}

helm/values-mariner.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ ingress:
5959
- path: /grafana
6060
pathType: Prefix
6161
service: grafana
62-
- path: /api
63-
pathType: prefix
64-
service: backend
6562
- path: /docs
6663
pathType: Prefix
6764
service: backend

0 commit comments

Comments
 (0)