Repository navigation
feat: restart statefulsets based on ConfigMap/Secret content - #481
Conversation
bf49a84 to
9efe76a
Compare
|
A small feature idea: |
sbernauer
left a comment
There was a problem hiding this comment.
Basically LGTM, I only recommend to remove the UID prefix
9efe76a to
f2db3a4
Compare
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
sbernauer
left a comment
There was a problem hiding this comment.
Behavior, docs and tests LGTM now (I only didn't look at the code so far) 👍
sbernauer
left a comment
There was a problem hiding this comment.
LGTM, many thanks! Clever solution that we can release straight and doesn't cause any unnecessary restarts.
However, I think you were originally right to use a Role (instead of ClusterRole). We shouldn't worsen helm security just because of olm. I raised stackabletech/stackable-utils#137, so we hopefully can switch the PR back to a Role
Description
Adds a keyed digest of the configmap / secret's content to use for detecting required restarts instead of using
resourceVersionwhich gets bumped by e.g. metadata changes. This should bring down the number of unnecessary restarts.To create a digest that cannot be reversed into its actual content by brute force, a key is used. It is stored in a secret that is created by the operator. This requires us to extend the permissions to allow for secret creation and retrieving. This is done via a Role, but it requires this change first: stackabletech/stackable-utils#137
The alternative is to go with a ClusterRole, which was discarded to keep the privileges narrow.
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features trackerRelease Note:
The restart controller now adds a keyed digest as an annotation to detect changes. This avoids restarts based on metadata changes on config maps or secrets, e.g. through CD tools. The key is stored in a secret, managed by the operator.