This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 192
Do not update certificates on filesystem if content is identical. #2584
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
3 tasks
vijaykatam
reviewed
Jun 8, 2022
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.
Minor comments. Could you update issue with more details? It is completely empty.
Codecov Report
@@ Coverage Diff @@
## main #2584 +/- ##
==========================================
- Coverage 42.58% 42.54% -0.04%
==========================================
Files 401 401
Lines 39796 39834 +38
==========================================
+ Hits 16948 16949 +1
- Misses 21261 21286 +25
- Partials 1587 1599 +12
Continue to review full report at Codecov.
|
adduarte
force-pushed
the
issue_2570
branch
2 times, most recently
from
June 8, 2022 22:58
84df175
to
132a292
Compare
vijaykatam
reviewed
Jun 9, 2022
vijaykatam
approved these changes
Jun 9, 2022
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. Rebase for CI fix.
When installing new certificates, even if the file contents are identical, it will retrigger a a reload of TLS certificates by the controller-runtime. This causes the controller-runtime to reload TLS certificates everytime the webhook tls are managed. This pr fixes that by only writing the certificates to the filesystem if the contents of the file (certificates) have actually changed. This pr also increases the management frequency from 1 minute to 90 minutes
ankeesler
pushed a commit
to ankeesler/tanzu-framework
that referenced
this pull request
Jun 14, 2022
…ware-tanzu#2584) When installing new certificates, even if the file contents are identical, it will retrigger a a reload of TLS certificates by the controller-runtime. This causes the controller-runtime to reload TLS certificates everytime the webhook tls are managed. This pr fixes that by only writing the certificates to the filesystem if the contents of the file (certificates) have actually changed. This pr also increases the management frequency from 1 minute to 90 minutes
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
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.
When installing new certificates, even if the file contents
are identical, it will retrigger a a reload of TLS certificates
by the controller-runtime. This causes the controller-runtime
to reload TLS certificates everytime the webhook tls are managed.
This pr fixes that by only writing the certificates to the filesystem
if the contents of the file (certificates) have actually changed.
This pr also increases the management frequency from 1 minute to
90 minutes
Which issue(s) this PR fixes
Fixes #2570
Describe testing done for PR
local unit test
deployed aws cluster and pointed addons-manager to it. then manually removed tls.crt and tls.key files and observed the files succesfully be re-written, repeated same test but instead of removing file, changed contents of file and observed files being re-written.
Also observed that if files where unchanged, they were NOT rewritten at management time.
Release note
PR Checklist
Additional information
Special notes for your reviewer