Closed lenaxia closed 2 years ago
This should've resulted in an ingress object being created in the monitoring namespace and a cert request going through. I did not see either of these and grafana remained unavailable.
Can you be a bit more descriptive? I see the annotations
being added to the Grafana configuration, but are they being rendered and applied as an actual Deployment
object once it's applied to the cluster? Do you see an Ingress
object on the cluster?
From what I can tell there isn't a ingressClassName
setting in the kube-prometheus-stack
configuration. This is what I am looking at https://github.com/prometheus-community/helm-charts/blob/85bfdf4f72dea1327ab52d3b4d508f7f5bd633ae/charts/kube-prometheus-stack/values.yaml#L730-L766
Also it took me a few minutes, but I think you have your override values incorrectly specified. If you're looking to override the Grafana defaults you will need to have a root of kube-prometheus-stack
values:
kube-prometheus-stack:
grafana:
ingress:
enabled: true
annotations:
#cert-manager.io/cluster-issuer: "letsencrypt-staging"
cert-manager.io/cluster-issuer: "ca-issuer" # self signed dev cert
traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
hosts:
- &host "grafana.${SECRET_DEV_DOMAIN}"
tls:
- hosts:
- "grafana.${SECRET_DEV_DOMAIN}"
secretName: "grafana-devdomain-tls-staging"
It also might be easier to put these into a file and reference them with valuesFrom:
instead of listing the values over multiple lines in the HelmRelease
object configuration you have. Either should work, it's just what I would do instead of listing them all freely.
In the end I don't think this is an issue with tobs itself, but an issue with configuration on the Traefik or FluxCD side. When I set kube-prometheus-stack.grafana.ingress.enabled=true
, it will render the Ingress
CR needed to set the object in the cluster
kube-prometheus-stack:
grafana:
enabled: true
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: "ca-issuer" # self signed dev cert
traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
---
# Source: tobs/charts/kube-prometheus-stack/charts/grafana/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: release-name-grafana
namespace: default
labels:
helm.sh/chart: grafana-6.32.10
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "9.0.7"
app.kubernetes.io/managed-by: Helm
annotations:
cert-manager.io/cluster-issuer: "ca-issuer"
traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
spec:
rules:
- http:
paths:
- backend:
service:
name: release-name-grafana
port:
number: 80
path: /
pathType: Prefix
@lenaxia I am going to close this. If you feel like your questions were not answered please re-open! Thanks!
Thanks nhudson! That got it working, appreciate the help. Now having other issues with no data coming in, digging in on that now.
What did you do? While I know I can do port forwarding, I'd prefer to have TOBS behind a reverse proxy like all my other services. I use Traefik and tried to configure grafana like I do normally:
Did you expect to see some different?
This should've resulted in an ingress object being created in the monitoring namespace and a cert request going through. I did not see either of these and grafana remained unavailable.
Environment
K3s being deployed using fluxcd2
tobs version:
tobs version: 12.0.1
Kubernetes version information:
kubectl version
Kubernetes cluster kind:
Bootstrapped through fluxcd
Anything else we need to know?: