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

replace UpdateStatus() for ApplyStatus ThanosRuler #5913

Conversation

marioferh
Copy link
Contributor

Description

To set the status subresource, the operator make use of ApplyStatus() instead of UpdateStatus() to avoid informer errors.

Type of change

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

  • replace UpdateStatus() for ApplyStatus() in order to avoid informer errors.

Signed-off-by: Mario Fernandez <mariofer@redhat.com>
Signed-off-by: Mario Fernandez <mariofer@redhat.com>
@marioferh marioferh requested a review from a team as a code owner September 13, 2023 11:19
pkg/thanos/operator.go Outdated Show resolved Hide resolved
pkg/thanos/operator.go Outdated Show resolved Hide resolved
pkg/thanos/operator.go Outdated Show resolved Hide resolved
WithUnavailableReplicas(a.Status.UnavailableReplicas)

for _, condition := range a.Status.Conditions {
trac.WithConditions(
Copy link
Contributor

Choose a reason for hiding this comment

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

(suggestion) this can be extracted to pkg/operator/operator.go (or a new pkg/operator/applyconfiguration.go) and shared with Alertmanager.

inline func
PrometheusOperatorFieldManager in operator pkg
delete duplicate line

Signed-off-by: Mario Fernandez <mariofer@redhat.com>
@simonpasquier simonpasquier merged commit d86d6a4 into prometheus-operator:main Sep 14, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants