-
Notifications
You must be signed in to change notification settings - Fork 120
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
Keypair rotation #3208
Keypair rotation #3208
Conversation
Skipping CI for Draft Pull Request. |
Today I was trying to directly modify the .key file by entering the bash of the pod kubectl exec -it kafka-sink-receiver-698ff747b4-75sg6 --namespace=knative-eventing -- /bin/sh, but it doesn't work with a lot of different attempts. :(( @Cali0707 suggested me to write some unit tests, so I will write some unit test to make sure my function works as expected tomorrow! :)) |
...receiver/src/main/java/dev/knative/eventing/kafka/broker/receiver/impl/ReceiverVerticle.java
Outdated
Show resolved
Hide resolved
...receiver/src/main/java/dev/knative/eventing/kafka/broker/receiver/impl/ReceiverVerticle.java
Outdated
Show resolved
Hide resolved
Yes, our container filesystems are usually read-only, so you can't do that, see
|
Codecov Report
@@ Coverage Diff @@
## main #3208 +/- ##
=============================================
- Coverage 79.84% 63.65% -16.19%
- Complexity 763 774 +11
=============================================
Files 78 170 +92
Lines 2744 11915 +9171
Branches 246 250 +4
=============================================
+ Hits 2191 7585 +5394
- Misses 401 3754 +3353
- Partials 152 576 +424
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@pierDipi @creydr I have switched to filesystem watcher, and by writing a small test, I can see that when the file changed, the update function will be called. I am wondering that am I on the right track?
|
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 @Leo6Leo !
...receiver/src/main/java/dev/knative/eventing/kafka/broker/receiver/impl/ReceiverVerticle.java
Outdated
Show resolved
Hide resolved
...receiver/src/main/java/dev/knative/eventing/kafka/broker/receiver/impl/ReceiverVerticle.java
Outdated
Show resolved
Hide resolved
data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java
Outdated
Show resolved
Hide resolved
data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java
Outdated
Show resolved
Hide resolved
data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java
Outdated
Show resolved
Hide resolved
…r/core/file/SecretWatcher.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
…r/core/file/SecretWatcher.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Should I try to implement this approach I mentioned here? #3208 (comment) @pierDipi |
I'd say not required, more like a future enhancement? |
/retest |
/retest |
1 similar comment
/retest |
/retest-required |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Leo6Leo, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test channel-integration-tests-sasl-ssl |
1 similar comment
/test channel-integration-tests-sasl-ssl |
* Bump Quarkus to 3.1.2 Final (test failing) * update the dependencies, and overwrite the antlr version * Code-gen * codegen * Bump up vertx and coomplete codegen * Trying to implement the keypair rotation * Finish implementing the watcher * codegen * Write the filesystem watcher * Execute the sslOptions update if the changes are detected * Close the watcher if the vertx server is shut down * Update data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Separate the testing env and the production env * Change the key and crt file names to use variable * Change variable to private * Updathe assert rules * Format change * Add the condition check for secretWatcher * Update data-plane/receiver/src/main/java/dev/knative/eventing/kafka/broker/receiver/impl/ReceiverVerticle.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Changed to use onSuccess and onFailure * Move the injection to the constructor * Update the ReceiverVerticleFactory * reformat * Update data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Update data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/file/SecretWatcher.java Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Fixed all the comments in the second round of review * Fixed all the comments in the second round of review * Format fix * Format fix * codegen --------- Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Fixes #3164
Proposed Changes
updateSSLOptions
to update the server SSL options when the changes in the mounted secret volume are detected by the watcherTask List
Additional Note
Release Note
Docs