-
Notifications
You must be signed in to change notification settings - Fork 187
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
Disable caching of secrets and configmaps #989
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
souleb
added
enhancement
New feature or request
experimental
Issues and pull requests related to experimental features
labels
Dec 19, 2022
6 tasks
hiddeco
reviewed
Dec 20, 2022
mac-chaffee
force-pushed
the
no-cache-secrets
branch
from
January 12, 2023 18:24
d0e04d0
to
b2a6b99
Compare
mac-chaffee
changed the title
Disable caching of secrets
Disable caching of secrets and configmaps
Jan 12, 2023
mac-chaffee
force-pushed
the
no-cache-secrets
branch
from
January 12, 2023 18:25
b2a6b99
to
17ec125
Compare
hiddeco
reviewed
Jan 13, 2023
hiddeco
reviewed
Jan 13, 2023
darkowlzz
reviewed
Jan 16, 2023
mac-chaffee
force-pushed
the
no-cache-secrets
branch
2 times, most recently
from
January 18, 2023 15:39
9094965
to
a20c11b
Compare
mac-chaffee
requested review from
hiddeco and
darkowlzz
and removed request for
hiddeco and
darkowlzz
January 18, 2023 15:40
You can re-enable caching by starting the controller with the argument '--feature-gates=CacheSecretsAndConfigMaps=true' Signed-off-by: Mac Chaffee <[email protected]>
hiddeco
force-pushed
the
no-cache-secrets
branch
from
January 27, 2023 11:38
a20c11b
to
f84afcb
Compare
stefanprodan
removed
the
experimental
Issues and pull requests related to experimental features
label
Jan 27, 2023
hiddeco
approved these changes
Jan 27, 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.
Thank you @mac-chaffee 🙇
This was referenced Apr 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For background, see fluxcd/helm-controller#512 and fluxcd/helm-controller#513
This PR adds a new opt-in feature gate (CacheSecrets) which causes the default source controller to stop caching secrets. Users can set that feature gate to "true" to go back to the old behavior of caching secrets.
The source controller fetches secrets to perform authenticated git clones, but the controller-runtime client greedily fetches all secrets in the cluster to cache them (LIST and WATCH operations instead of GET operations). Since it's common to have very large secrets for helm charts, this behavior can use up a lot of RAM.
I'm also interested in this feature so that users can run source-controller without giving it cluster-wide access to secrets which can be quite a dangerous permission.