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
[Bug] GrafanaAlertRuleGroup changes when applied #1492
Comments
@AlexEndris it sounds like the Operator removes fields that are not in the spec and then ArgoCD applies them again. In that case, wouldn't it make sense to remove those fields (and use the |
@pb82 Thank you for your reply. My point was that the yaml is just a copy & paste from what grafana itself exports in version 10.4.1. I assumed that those would be the same. |
The duration fields in the Kubernetes custom resource are using a different duration type than the Grafana export, that's why the saved resource shows a different to the Grafana export. Does this cause any problems or is it just a cosmetic issue? |
@theSuess It actually causes ArgoCD to detect a difference and tries to constantly sync the state, overwriting the manifest over and over. We had to adjust the export manually to stop this. |
I see. I don't think there's anything we can do about this from an operator perspective (as the data representation is handled differently in k8s vs Grafana). I'll close this issue and check with the alerting team to see if we can add a separate export format for an operator compatible CR into Grafana |
@theSuess Thank you for the consideration! That would definitely help reducing manually having to change this. ❤️ |
Describe the bug
Deploying a GrafanaAlertRuleGroup in a k8s cluster using ArgoCD, due to applying defaults (see diff in screenshot) the resource changes and is flagged as "OutOfSync" by ArgoCD.
Version
v5.8.1
To Reproduce
Apply a GrafanaAlertRuleGroup that has been exported by Grafana:
Expected behavior
Defaults like
to: 0
from the "relativeTimeRange" orisPaused: false
orinterval: 5m
don't change.Actual behavior
to: 0
andisPaused: false
vanish, probably due to being defaults, andinterval: 5m
changes tointerval: 5m0s
.Suspect component/Location where the bug might be occurring
Please provide this if you know where this bug might occur otherwise leave as
unknown
Screenshots
Left is the changed resource, right is the actual resource as a file:
The text was updated successfully, but these errors were encountered: