apiserver-network-proxy
apiserver-network-proxy copied to clipboard
Add file watcher for TLS certificate files
Currently the agent and server are not honouring the change of TLS certificates provided to them. This PR introduces a file watcher for both agent and server to restart the corresponding components in case there as been a change in the TLS certificates.
Changes
- Add fsnotify dependency to go.mod
- Add file watcher for certificate files in
cmd/agent/app/server.go
andcmd/server/app/server.go
- Reload TLS config and credentials on certificate file change in
cmd/agent/app/server.go
andcmd/server/app/server.go
- Refactor and clean up file watcher code in
cmd/agent/app/server.go
andcmd/server/app/server.go
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: afritzler Once this PR has been reviewed and has the lgtm label, please assign jkh52 for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Welcome @afritzler!
It looks like this is your first PR to kubernetes-sigs/apiserver-network-proxy 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/apiserver-network-proxy has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @afritzler. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/ok-to-test
Initial thoughts:
Some admins may want a security posture that disallows this, it could be better to opt-in to the new feature via flag (or at a minimum support an opt-out).
We need to make sure this doesn't make https://github.com/kubernetes-sigs/apiserver-network-proxy/issues/350 harder to implement (seems like it shouldn't).
It would be nice to see some unit test coverage.
/cc @tallclair
@jkh52 thanks a lot for the feedback. Let me address the point of disabling the rotation + adding some test coverage.
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale
- Close this PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle rotten
- Close this PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the PR is closed
You can:
- Reopen this PR with
/reopen
- Mark this PR as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the PR is closedYou can:
- Reopen this PR with
/reopen
- Mark this PR as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: afritzler / name: Andreas Fritzler (34f2fe7c93ef0bb0e2a06c6f990b73fb9a644937)
@afritzler - see the effort at https://github.com/kubernetes-sigs/apiserver-network-proxy/pull/577 (it would give you attribution, but 'EasyCLA check' does not pass. Can you fix that part?)
@afritzler: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-apiserver-network-proxy-docker-build-arm64-master | 34f2fe7c93ef0bb0e2a06c6f990b73fb9a644937 | link | true | /test pull-apiserver-network-proxy-docker-build-arm64-master |
pull-apiserver-network-proxy-docker-build-amd64-master | 34f2fe7c93ef0bb0e2a06c6f990b73fb9a644937 | link | true | /test pull-apiserver-network-proxy-docker-build-amd64-master |
pull-apiserver-network-proxy-make-lint-master | 34f2fe7c93ef0bb0e2a06c6f990b73fb9a644937 | link | true | /test pull-apiserver-network-proxy-make-lint-master |
pull-apiserver-network-proxy-test-master | 34f2fe7c93ef0bb0e2a06c6f990b73fb9a644937 | link | true | /test pull-apiserver-network-proxy-test-master |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
@afritzler - see the effort at #577 (it would give you attribution, but 'EasyCLA check' does not pass. Can you fix that part?)
Thanks a lot for the update. I fixed the CLA issue. I guess we can close this PR in favor of #577.