Comments (9)
Yeah this is an interesting edge-case. This is what happens:
- The folder is created through the dashboard resource. It will get a random UID when doing this
- The folder resource sees this folder and doesn't create a new one
- The alert rule group references the folder resource and tries to get its UID. As the folder resource did not create the folder, the UID does not match so you get the resulting error.
There is a way to resolve this in the upcoming update
- Create a folder resource for the namespace
- Reference the folder in the dashboard using
folderRef
(this is not yet released) - Reference the same folder in the alert rule group
This way, the folder resource has full control over the UID and matching will work as expected
We'll release a new version soon - would love to hear back once you updated and tried the new aproach
from grafana-operator.
Sadly helm does not support CRD updates. The way to upgrade CRD definitions when using helm is documented here: https://grafana.github.io/grafana-operator/docs/installation/helm/#upgrading
In short, we release CRD manifests alongside every release which you can apply directly
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/v5.11.0/crds.yaml
from grafana-operator.
Thank you!
I was under the impression the CRDs were created by the Operator, which caused a fair amount of confusion on my end.
Flux has now been updated with the relevant configs to support CRD updates
fluxcd/flux2#3953 (comment)
from grafana-operator.
Can you verify that a folder with this UID exists in the Grafana instance? If so, does restarting the operator pod fix the issue?
from grafana-operator.
Can you verify that a folder with this UID exists in the Grafana instance? If so, does restarting the operator pod fix the issue?
However alert fails to apply in the same way specified in the bug.
I have attempted to restart the operator however there appears to be no difference.
from grafana-operator.
From what I can conclude, my team members and I figured that if you put the alerts into a folder which has the same name as its namespace, it doesn't appear to handle it well. This is the UID of the folder (which is named like the namespace)
This is the error on one of the Grafanaalertrulegroups
from grafana-operator.
I'm also experiencing similar behaviour. If you delete the ARG (kubectl delete grafanaalertrulegroup
) and apply it again, it's able to find the folder's uid, and is applied successfully.
Looking forward to a fix.
from grafana-operator.
The fix for this has been released in v5.11 - see my previous comment on how to resolve this in the new version
from grafana-operator.
Hi @theSuess I love that this was released, it flew under my radar while I was working with the 5.10 version of the chart and Operator image.
I tried to upgrade the operator image and chart from 5.10 to 5.11, but the operator did not replace the CRDs in the cluster.
In the end I had to uninstall all of my Grafana resources and have the Operator reinstall the CRDs before I could make use of the new folderRef field.
Is there a better way for me to go about this in the future in case you do another update to an existing CRD(Without changing the api version)
from grafana-operator.
Related Issues (20)
- Mandatory status.conditions breaks operator upgrade (5.9.2 -> 5.9.10) HOT 1
- Default operator (controller) memory resources are too low HOT 11
- [Bug] Alert rule groups block deletion of folders when removed at the same time
- [Bug] Operator assigns datasource to wrong organization HOT 6
- New `grafanafolder#spec.uid` property for stable UIDs HOT 4
- Add annotations to crd HOT 2
- [Bug] growth in alert_rule_version table HOT 4
- helm: Unable to set addional pod labels HOT 1
- [Bug] unable to create notification policy with `matchers` set HOT 2
- [Bug] disableResolveMessage not being applied to contact point
- [Bug] Folder pointed by a GrafanaDashboard using folderUID is deleted even if the folder is not handled by the operator HOT 1
- Permits to target a grafanaFolder in another namespace into the GrafanaDashboard CR HOT 1
- [Bug] Operator randomly tries to scale up and down Grafana operated service HOT 3
- [Bug] GrafanaDatasource not visible in Grafana HOT 2
- Add option for json structured logging output for grafana-operator
- [Bug] GF_PATHS_PLUGINS content removed by operator
- [Bug] Plugins installation failed with datasource HOT 3
- operator hub image id points to tag and not digest HOT 1
- [Bug] Notification settings in Alert rule group not sync'ed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-operator.