-
Notifications
You must be signed in to change notification settings - Fork 20
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(cert): add cryostat CA cert to target namespaces #661
Conversation
/build_test |
923c1cb
to
25d5761
Compare
8e46946
to
863717a
Compare
Sorry to complicate things further, but since these secrets will be in different namespaces from the CR, they cannot be owned by the CR. This means we can't leverage Kubernetes garbage collection to clean them up when the CR is deleted. The get around this we can use the existing finalizer to manually delete the secrets when the user attempts to delete the CR. Here's where we use finalizers in the operator currently: cryostat-operator/internal/controllers/reconciler.go Lines 126 to 148 in 3f928ca
We'll want want to add something here like |
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.
Hi Ming! Just a few more comments. Are you planning to add some tests for these changes? I can help you get started with them
655827e
to
0d5156f
Compare
/build_test |
fd43955
to
c717352
Compare
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.
Hi @mwangggg, sorry it took me a while to get back to this PR. I have some more suggestions below. If you have any questions about them, please let me know.
7f7c1db
to
b834223
Compare
/build_test |
713f2c4
to
d23525c
Compare
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.
Oh whoops, I noticed while testing this in OpenShift that we need to be more selective with what we copy from the Secret. cert-manager includes the private key in addition to the certificate in the CA secret. We definitely don't want to copy that all over the cluster.
I've made some suggestions below to remedy this.
6775f1b
to
cdc9454
Compare
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.
Hi @mwangggg, sorry for the delay on this. This one thing jumped out at me.
6173f58
to
64acdbb
Compare
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.
Hi Ming, a few more comments below.
/build_test |
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.
Looks good! Thanks for the great work!
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit -S -m "YOUR_COMMIT_MESSAGE"
Fixes: #595