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

[grafana] feat: adds multi-org support to sidecar dashboards #3240

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

VeseliD
Copy link

@VeseliD VeseliD commented Jul 24, 2024

Converts sidecar.dashboards.provider to a list at
sidecar.dashboards.providers allowing the definition of multiple
providers that can be mappped to orgs as required.

Still supports the singular variant to retain backwards compatibility
and will prepend it to any configured providers

Results in multi-org support defining providers like the example below which

sidecar:
    folderAnnotation: grafana_folder
    dashboards:
      enabled: true
      providers:
        - name: prod
          orgid: 1
        - name: nonprod
          orgid: 2
        - name: ops
          orgid: 3

This then allows dashboard configmaps to be define the annotation grafana_folder: /tmp/dashboards/ops instructing the sidecar to put the dashboard in the folder that's been specific in our configuration above.

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-dashboard
  namespace: monitoring
  labels:
    grafana_dashboard: '1'
  annotations:
    grafana_folder: /tmp/dashboards/ops/
data:
  my-dashboard.json: |-
   {}

Please, have in mind that you can define your own folderAnnotation:
We used value grafana_folder just as example.

We reference to this PR: #2939

Signed-off-by: Dragomir Veselinovic <dragomir.veselinovic@cyberlab.rs>
@CLAassistant
Copy link

CLAassistant commented Jul 24, 2024

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Dragomir Veselinovic <dragomir.veselinovic@cyberlab.rs>
@zanhsieh zanhsieh changed the title feat: adds multi-org support to sidecar dashboards [grafana] feat: adds multi-org support to sidecar dashboards Aug 3, 2024
Signed-off-by: MH <zanhsieh@gmail.com>
Signed-off-by: MH <zanhsieh@gmail.com>

Signed-off-by: MH <zanhsieh@gmail.com>
@VeseliD
Copy link
Author

VeseliD commented Aug 14, 2024

Hello team, any update on this PR?
Thanks!

Signed-off-by: MH <zanhsieh@gmail.com>
@zanhsieh
Copy link
Collaborator

@jkroepke @Xtigyro Can you review this PR please?

Copy link
Collaborator

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have that feeling, that the current implementation is too complex for normal end-users.

While the provisioning part looks good, using an annotation like grafana_folder and require with value like /tmp/dashboards/ops/ into it where ops stands for orgID 3, it feels not great.

What happens, if /tmp/dashboards/ops2/ is used? An error will be not reported. to end-users.

Too much glue is used here to archive something.

However, I will be not the part, who is blocking this.

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

Successfully merging this pull request may close these issues.

5 participants