Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchNamespaceSelectors does not create dynamic dashboards in grafana. #10581

Open
chris530 opened this issue Jan 24, 2025 · 1 comment
Open

Comments

@chris530
Copy link

Gloo Edge Product

Enterprise

Gloo Edge Version

v1.18.2

Kubernetes Version

v1.31

Describe the bug

Customer created a ticket ( https://solo-io.zendesk.com/agent/tickets/5239 ). Upstream dashboards in grafana do not get created when using watchNamespaceSelectors in Settings. I was able to reproduce this issue in my environment as well.

``

Expected Behavior

Defining watchNamespaceSelectors should find namespaces and add dynamic dashboards.

Steps to reproduce the bug

Installed gloo ( 1.18.2 ) , where no watchNamespaceSelectors is defined in Settings.

Added a static upstream , which is accepted from Gloo.

---
apiVersion: gloo.solo.io/v1
kind: Upstream
metadata:
  name: nginx-static-80
  namespace: chris
spec:
  connectionConfig:
    maxRequestsPerConnection: 0
    perConnectionBufferLimitBytes: 777666
  static:
    hosts:
      - addr: nginx.web.svc.cluster.local
        port: 80

Logging into grafana, a upstream dashboard was created.

Image

I reinstall gloo with same steps. Then label namespace.

kubectl create ns chris 
kubectl label ns chris gloo-translate=enabled

Confirmed label selector is working

kubectl get ns -l gloo-translate=enabled                     
NAME    STATUS   AGE
chris   Active   3m

Added label selector to settings.

...
  refreshRate: 60s
  watchNamespaceSelectors:
  - matchLabels:
      gloo-translate: enabled

Waiting awhile, ( also restarted observability pod ). upstream dashboard never gets created.

NOTE: If I remove the watchNamespaceSelectors in Settings , the dashboard gets immediately created in grafana.

Additional Environment Detail

Gloo 1.18.2
K8s 1.31
EKS

Additional Context

Followed these steps

https://docs.solo.io/gloo-edge/main/operations/upgrading/faq/
https://docs.solo.io/gloo-edge/main/installation/advanced_configuration/multiple-gloo-installs/#specify-namespaces-to-watch-for-kuberenetes-services-and-gloo-gateway-crs

@chris530 chris530 changed the title watchNamespaceSelectors does not pick up dynamic dashboards in grafana. watchNamespaceSelectors does not create dynamic dashboards in grafana. Jan 24, 2025
@chris530
Copy link
Author

chris530 commented Jan 24, 2025

Also tried with a expression , with no luck.

  watchNamespaceSelectors:
  - matchLabels:
      gloo-translate: enabled
  - matchExpressions:
    - key: env
      operator: In
      values:
      - prod
kubectl get ns -l gloo-translate=enabled -l env=prod
NAME    STATUS   AGE
chris   Active   6h26m

kubectl get upstream -n chris
NAME              AGE
nginx-static-80   6h9m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant