-
Notifications
You must be signed in to change notification settings - Fork 780
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
feat: Implement tls checker for webhook #1696
feat: Implement tls checker for webhook #1696
Conversation
Thanks for the PR! It's marked as a draft, is that still the case? |
@maxsmythe Hi! I mark this as draft because I hope a reviewer can help to check if this feature is good to go. If it is, I will add the relevant documentation and remove the draft label. |
I have implemented the tlsChecker that is attached in liveness probe when enabled. It compares the certificate served by webhook server and the certificate saved in certDir, and returns error when mismatched is found during a liveness probe check. Attached is the log of a failed check. Kubelet is about to kill this pod, after this, the secret should resume normal: |
@maxsmythe Hi, do you mind take a look? :) |
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.
Sorry I dropped the ball on reviewing this. LGTM. Thank you for flag-gating it!
Codecov Report
@@ Coverage Diff @@
## master #1696 +/- ##
==========================================
- Coverage 52.14% 51.74% -0.40%
==========================================
Files 98 99 +1
Lines 8781 8816 +35
==========================================
- Hits 4579 4562 -17
- Misses 3837 3887 +50
- Partials 365 367 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
The case fails as this healthcheck probe needs use an insecure http client to get the certificates served in webhook no matter what CA it is using. I believe this is not an issue. |
Can you set a skip directive for the linter for that line. I agree the insecure TLS is not an issue here. |
skip directive added and tested locally on my machine. |
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.
Thanks for the PR @ethernoy! Approved pending #1696 (comment) and make manifests
updated staging helm chart for feature enablement; Signed-off-by: Ethern Su <ehaprime@gmail.com>
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! LGTM
@ethernoy looks like there is a diff here when running |
Signed-off-by: Ethern Su <ehaprime@gmail.com>
@sozercan updated helmify static manifests. |
Hello team, When can we merge the fix into a release? |
Hi, this fix should already be in release 3.8.0 |
Signed-off-by: Ethern Su ehaprime@gmail.com
What this PR does / why we need it:
This PR is a purposed solution of #1684, which adds a TLS checker over healthz probe in webhook server to detect the case where file in certsDir is not correctly served in webhook server (it can actually be reproduced easily)
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #1684
Special notes for your reviewer:
I am submitting this draft PR because I want to have a working example of the solution I suggested, so that we can proceed to discuss whether this solution is preferred and make changes if approriate. If this solution is preferred, I will ready this PR with more documentation in websites and code comments.
Also I am new to this project, please let me know if there is any implementation/formatting issue in my code :)