grafana / grafana-operator

An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
https://grafana.github.io/grafana-operator/
Apache License 2.0
863 stars 384 forks source link

Feat: add parentFolderUID field in GrafanaFolder CRD #1566

Closed aboulay-numspot closed 2 months ago

aboulay-numspot commented 3 months ago

You will find an implementation of the parentFolderUID. However, I didn't implement an e2e check because the id of the folder is generated.

CHANGELOG:

Do you know if there is somewhere I can put code example that presents the use of the parentFolderUID in GrafanaFolder CR?

aboulay-numspot commented 2 months ago

Sorry, I was absent during this week. I'll try to handle the change you ask for on it.

weisdd commented 2 months ago

@aboulay-numspot could you rebase your branch and then regenerate manifests? - config/crd-for-docs-generation has been recently removed, so we should not have config/crd-for-docs-generation/grafana.integreatly.org_grafanafolders.yaml as part of the PR.

aboulay-numspot commented 2 months ago

@aboulay-numspot could you rebase your branch and then regenerate manifests? - config/crd-for-docs-generation has been recently removed, so we should not have config/crd-for-docs-generation/grafana.integreatly.org_grafanafolders.yaml as part of the PR.

@weisdd - I have rebase and remove the file. Normally it should be fine.

NissesSenap commented 2 months ago

Solves: https://github.com/grafana/grafana-operator/issues/1222

atos-cosmin-gavagiuc commented 2 months ago

@aboulay-numspot, can we specify the folder UID when creating the folder? This way, we can pre-provision the parent folder and use its UID as the parentUID for the child folder. Otherwise, I fear that the folder UID will be autogenerated and will differ in each Grafana deployment.

aboulay-numspot commented 2 months ago

@aboulay-numspot, can we specify the folder UID when creating the folder? This way, we can pre-provision the parent folder and use its UID as the parentUID for the child folder. Otherwise, I fear that the folder UID will be autogenerated and will differ in each Grafana deployment.

Hi @atos-cosmin-gavagiuc, the aim of this MR is to add the possibility to add a parent subfolder by using it UID. To be fully honest, I prefer to keep an unitary feature inside it yet. (I would have already implemented the folderRef feature otherwise...)

However, I think it could be a great functionality and it is currently supported by the Grafana provider terraform. Do you think you could create an issue about it to track the need?