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

fix(controllers): do not reconcile status updates #233

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

jlevesy
Copy link
Contributor

@jlevesy jlevesy commented Oct 27, 2023

What does this PR do?

This PR places an event filter when setting up that filters out updates to the status of all managed resources by this controller. We only want to reconcile the dashboards only if there's a change in the spec of the object, not the status.

I'm not 100% sure of myself but I suspect this creates an infinite loop of events: as it is, when the first reconciliation is done, dark sets the status to OK, which triggers another update and another reconciliation, and another status update... and so on and so forth 😅

Happy to chat about this.

Reference: kubernetes-sigs/kubebuilder#1103 and kubernetes-sigs/kubebuilder#618

@jlevesy jlevesy force-pushed the jl/do-not-reconcile-status-updates branch from cc6c7b4 to a529e00 Compare October 27, 2023 15:02
@jlevesy
Copy link
Contributor Author

jlevesy commented Oct 27, 2023

CI failure looks unrelated. I'll take a stab at fixing it.

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2023

Codecov Report

Merging #233 (653c817) into master (675523d) will decrease coverage by 0.07%.
Report is 4 commits behind head on master.
The diff coverage is 16.66%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #233      +/-   ##
==========================================
- Coverage   40.99%   40.93%   -0.07%     
==========================================
  Files          39       39              
  Lines        2583     2587       +4     
==========================================
  Hits         1059     1059              
- Misses       1484     1488       +4     
  Partials       40       40              
Files Coverage Δ
...nternal/pkg/controllers/alertmanager_controller.go 0.00% <0.00%> (ø)
internal/pkg/controllers/apikey_controller.go 0.00% <0.00%> (ø)
internal/pkg/controllers/datasource_controller.go 0.00% <0.00%> (ø)
...nal/pkg/controllers/grafanadashboard_controller.go 0.00% <0.00%> (ø)
internal/pkg/converter/gauge.go 55.00% <50.00%> (ø)

@K-Phoen
Copy link
Owner

K-Phoen commented Oct 30, 2023

Thanks!

@K-Phoen K-Phoen merged commit f54f4d6 into K-Phoen:master Oct 30, 2023
3 of 5 checks passed
@jlevesy jlevesy deleted the jl/do-not-reconcile-status-updates branch November 1, 2023 08:39
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.

3 participants