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

Feat: add parentFolderUID field in GrafanaFolder CRD #1566

Conversation

aboulay-numspot
Copy link
Contributor

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:

  • Add field parentFolderUID field in GrafanaFolder CRD to target an existing folder in Grafana.
  • Add enable: nestedFolder in default kind's Grafana configuration (hack/kind/resources/default/grafana.yaml) to enable nestedFolder and been able to test the parentFolderUID targeting

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

Copy link
Member

@theSuess theSuess left a comment

Choose a reason for hiding this comment

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

Thanks for this! Please change the wording on the field description as the current description was unclear to me. For the other thread, this is just a minor nitpick and no need to act on it :)

api/v1beta1/grafanafolder_types.go Outdated Show resolved Hide resolved
api/v1beta1/grafanafolder_types.go Outdated Show resolved Hide resolved
api/v1beta1/grafanafolder_types.go Outdated Show resolved Hide resolved
@weisdd weisdd requested a review from HVBE June 6, 2024 19:52
@aboulay-numspot
Copy link
Contributor Author

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

@aboulay-numspot aboulay-numspot force-pushed the feat/add-parent-folder-uid-field-in-grafana-folder branch from bfe7ad1 to 7c82d04 Compare June 17, 2024 14:55
@aboulay-numspot aboulay-numspot force-pushed the feat/add-parent-folder-uid-field-in-grafana-folder branch from 9752f36 to 733e68b Compare June 19, 2024 12:26
@weisdd
Copy link
Collaborator

weisdd commented Jun 21, 2024

@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 aboulay-numspot force-pushed the feat/add-parent-folder-uid-field-in-grafana-folder branch from 733e68b to e320737 Compare June 21, 2024 18:21
@aboulay-numspot
Copy link
Contributor Author

aboulay-numspot commented Jun 21, 2024

@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.

@aboulay-numspot aboulay-numspot force-pushed the feat/add-parent-folder-uid-field-in-grafana-folder branch from 5272c58 to 7fd26f5 Compare June 24, 2024 16:41
@aboulay-numspot aboulay-numspot force-pushed the feat/add-parent-folder-uid-field-in-grafana-folder branch from 7fd26f5 to 9d9ec87 Compare July 1, 2024 08:55
@NissesSenap
Copy link
Collaborator

Solves: #1222

@atos-cosmin-gavagiuc
Copy link
Contributor

@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
Copy link
Contributor Author

@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?

@weisdd weisdd added this pull request to the merge queue Jul 2, 2024
Merged via the queue into grafana:master with commit df1a50e Jul 2, 2024
14 checks passed
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.

None yet

5 participants