-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
operator: Include runtime-config in compiling the SHA1 checksum #9448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed change set works against our first principles that the operator should delegate anything possible to the Kubernetes APIServer instead of inventing the wheel anew.
By saying this, I suggest you take a look on the code path starting from this snippet to discover how we instruct k8s to restart pods by passing annotations to the pod template spec:
loki/operator/internal/handlers/lokistack_create_or_update.go
Lines 267 to 270 in 11f5218
certRotationRequiredAt := "" | |
if stack.Annotations != nil { | |
certRotationRequiredAt = stack.Annotations[manifests.AnnotationCertRotationRequiredAt] | |
} |
I.e. The ruler config annotation is something that is updated on the LokiStack CR on every RulerConfig change. Affected components, e.g. ruler needs this annotation to be passed to the pod template spec.
@periklis updating the annotations is already implemented here for RulerConfig changes. However, updating anything below the |
042f7fc
to
7f3a09b
Compare
operator/controllers/loki/internal/lokistack/ruler_config_discovery.go
Outdated
Show resolved
Hide resolved
lokiv1 "github.com/grafana/loki/operator/apis/loki/v1" | ||
"github.com/grafana/loki/operator/internal/external/k8s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this change?
7bad4f7
to
a5d8064
Compare
What this PR does / why we need it:
Any changes made to the runtime-config can now trigger the reconciliation of the LokiStack.
Which issue(s) this PR fixes:
Fixes:
LOG-3953 - Updating the RulerConfig CR can now trigger the restart of the ruler pod (and thus reflecting the changes to the user-workload AM)
LOG-3950 - Enabling user-workload AM
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updateddocs/sources/upgrading/_index.md