-
Notifications
You must be signed in to change notification settings - Fork 163
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
Experimental support of drift detection #617
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hiddeco
force-pushed
the
detect-drift
branch
3 times, most recently
from
February 22, 2023 09:41
54eb1c6
to
ee4b8a6
Compare
hiddeco
added
enhancement
New feature or request
area/helm
Helm related issues and pull requests
labels
Feb 23, 2023
hiddeco
force-pushed
the
detect-drift
branch
4 times, most recently
from
February 23, 2023 21:42
0ca3a20
to
fed429b
Compare
hiddeco
commented
Feb 23, 2023
hiddeco
force-pushed
the
detect-drift
branch
4 times, most recently
from
February 24, 2023 15:37
d7aeb3f
to
e3905e5
Compare
hiddeco
force-pushed
the
detect-drift
branch
from
February 27, 2023 09:48
e3905e5
to
d1be2f1
Compare
aryan9600
reviewed
Feb 28, 2023
hiddeco
force-pushed
the
detect-drift
branch
4 times, most recently
from
February 28, 2023 15:55
4db1919
to
217e659
Compare
pjbgf
reviewed
Feb 28, 2023
pjbgf
approved these changes
Feb 28, 2023
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.
Awesome job @hiddeco!
This is backwards compatible, as it only changes the type without the further requirements around the YAML declaration. Signed-off-by: Hidde Beydals <[email protected]>
This enables experimental drift detection of cluster state compared to the current manifest data from the Helm storage's manifest blob. Drift detection works based on the already proven approach of the kustomize-controller's SSA package, and utilizes the managed field configured by the controller since `v0.12.2`. This feature is planned to go out of experimental once the further controller rewrite has been finished, and the state of the Helm storage itself is more fault tolerant. Signed-off-by: Hidde Beydals <[email protected]>
This allows a specific object from a release manifest to be excluded from drift detection by labeling or annotating it with: `helm.toolkit.fluxcd.io/diff: disabled`. Using a Kustomize post renderer definition in a HelmRelease, this can be used to ignore any object from an arbitrary chart. Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
As there are currently no other utilities to properly see what change the controller detected, this allows people to have an insight into the observed changes by configuring the controller with `--log-level=debug`. Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
stefanprodan
approved these changes
Mar 1, 2023
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.
LGTM
Thanks @hiddeco 🥇
PS. We need to add a section to the bootstrap docs and show how users can enable this feature.
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables experimental drift detection of cluster state compared to
the current manifest data from the Helm storage's manifest blob
by starting the controller with
--feature-gates=DetectDrift=true
.Drift detection works based on the already proven approach of the
kustomize-controller's SSA package, and utilizes the managed field
configured by the controller since
v0.12.2
.This feature is planned to go out of experimental once the further
controller rewrite has been finished, and the state of the Helm storage
itself is more fault tolerant.
It allows a specific object from a release manifest to be excluded
from drift detection by label or annotating it with:
helm.toolkit.fluxcd.io/driftDetection: disabled
.Using a Kustomize post renderer definition in a HelmRelease, this can
be used to ignore any object from an arbitrary chart.
Experimentally covers #186