-
Notifications
You must be signed in to change notification settings - Fork 396
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
New grafanafolder#spec.uid
property for stable UIDs
#1636
Comments
I have since found out, the same issue is present on |
Allowing custom UIDs on folders can become complicated (more complicated than other resources), because: if you change the UID on an already existing folder, what do you do with the original one and all the dashboards it contains? You'd have to write special logic to handle those cases (and agree on a policy). |
Could that be handled/enforced through an immutability clause requiring a recreate rather than an edit of the x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf That way, changing the UID is officially not supported, but it's possible to define a UID on creation? |
@aboulay-numspot will try to implement this with immutable UIDs |
I'm in the middle of defining a disaster-recovery process when recreating the Grafana Operator resources from scratch.
If I lose my cluster, ETCD state, or I mess up in a CD pipeline and any grafanafolder cr is deleted.
Recreating it results in an entirely new
metadata.uid
.Currently, the only way to recover from this is through manually/programmatically:
Describe the solution you'd like
UID property on grafanafolder resource to ensure it's always the same for a specific folder name.
Describe alternatives you've considered
folderUID
on Alertrules/DashboardsThis could work, except when onboarding new Grafana instances the folder does not exist and I cannot create the dashboards
folder
The folder will always have a different UID for each Grafana Instance. This could work, both when provisioning and Deleting.
It does however mean I cannot use the
folderRef
andfolderUID
properties on Alertrules and Dashboards and the grafanafolder crd.metadata.uid
already specified, but it's overwritten on first apply.The text was updated successfully, but these errors were encountered: