diff --git a/helm/pub-metrics-grafana/templates/ingress.yaml b/helm/pub-metrics-grafana/templates/ingress.yaml index bcbcea2..e0a2aba 100644 --- a/helm/pub-metrics-grafana/templates/ingress.yaml +++ b/helm/pub-metrics-grafana/templates/ingress.yaml @@ -20,10 +20,46 @@ spec: - host: {{ .Values.ingress.hostname | quote }} http: paths: - - pathType: Prefix - path: / + - path: /$ + pathType: Exact backend: service: name: {{ $fullName }} port: name: {{ $servicePort }} + - path: /dashboards + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + name: {{ $servicePort }} + - path: /d/.* + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + name: {{ $servicePort }} + - path: /playlists + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + name: {{ $servicePort }} + # Deny /api and /admin by sending them to a non-existent service or returning 404 + - path: /api + pathType: Prefix + backend: + service: + name: dummy-service # Doesn't exist, returns 404 + port: + number: 80 + - path: /admin + pathType: Prefix + backend: + service: + name: dummy-service # Doesn't exist, returns 404 + port: + number: 80 diff --git a/helm/pub-metrics-grafana/values.yaml b/helm/pub-metrics-grafana/values.yaml index f8b8ad8..50fde9f 100644 --- a/helm/pub-metrics-grafana/values.yaml +++ b/helm/pub-metrics-grafana/values.yaml @@ -53,10 +53,6 @@ ingress: hostname: dashboard.chia.net annotations: ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/server-snippet: | - location ~* /(api|admin) { - return 403; - } servicePort: http tls: enabled: true