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

Add support for arbitrary [Secure]JsonData #803

Merged
merged 4 commits into from
Aug 9, 2022

Conversation

meln5674
Copy link
Contributor

Description

  • Added customJsonData and customSecureJsonData fields to GrafanaDashboard.spec.datasources[*]
  • Added example manifests with a non-standard plugin datasource

Note: Requires updating controller-gen to v0.6.2

Relevant issues/tickets

Fixes #708

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

  1. Run
kubectl apply -f deploy/examples/GrafanaWithPlugin.yaml deploy/examples/datasources/Custom.yaml
kubectl get -o yaml configmap grafana-datasources
kubectl port-forward svc/grafana-service 3000:3000
  1. Confirm data source correctly created at http://localhost:3000/datasources in browser

@meln5674 meln5674 force-pushed the feature/grafana-operator-708 branch from f336013 to 6453394 Compare July 26, 2022 01:37
@meln5674 meln5674 force-pushed the feature/grafana-operator-708 branch from 6453394 to fa886e7 Compare July 26, 2022 01:48
@meln5674 meln5674 force-pushed the feature/grafana-operator-708 branch from 3b8e4e6 to 075eb1e Compare July 26, 2022 02:16
@NissesSenap
Copy link
Collaborator

This would also solve #788

@pb82
Copy link
Collaborator

pb82 commented Jul 26, 2022

@meln5674 I like the idea of using json.RawMessage. Does this work as an in place update or will there be conflicts with existing CRs?

EDIT: nvm. I see that you are adding fields, not replacing existing ones. So no conflict here.

@NissesSenap
Copy link
Collaborator

@pb82 have you had time to look in to this?

@pb82
Copy link
Collaborator

pb82 commented Aug 9, 2022

Verified with the Prometheus data source. Had some issues with the provided Druid example. Is there another plugin needed for this data source?

@pb82 pb82 merged commit a4d24b0 into grafana:master Aug 9, 2022
@pb82
Copy link
Collaborator

pb82 commented Aug 9, 2022

thanks @meln5674 !

@owenhaynes
Copy link

Could we get a release made with this in please?

@NissesSenap
Copy link
Collaborator

I will do it Thursday next week unless someone else prepareras the release.

@meln5674
Copy link
Contributor Author

meln5674 commented Oct 11, 2022 via email

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.

Support Arbitrary Plugin JsonData
4 participants