-
Notifications
You must be signed in to change notification settings - Fork 55
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
Rework cert generation so that it uses two deployments #96
Conversation
e21d0d7
to
1a9c8db
Compare
1a9c8db
to
f7f7e0f
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.
LGTM. Rebased this PR on master and tested on crc
.
2ab98f5
to
8190745
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.
I did not test it but code LGTM
8190745
to
8db8a1b
Compare
/approve |
8db8a1b
to
dc2e24d
Compare
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
dc2e24d
to
3225a06
Compare
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: amisevsk, JPinkney, sleshchenko The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
/auto-cc |
/retest |
2 similar comments
/retest |
/retest |
Signed-off-by: Josh Pinkney joshpinkney@gmail.com
What does this PR do?
This PR reworks the way we do cert generation completely and has a few massive benefits:
The way it works is that when webhooks are enabled we deploy an additional deployment called
che-workspace-controller-cert-gen
that has the sole responsibility of creating the configmap and service needed for the certs. Then, instead of mounting the configmap into the controller deployment later we mount the configmap in the controller deployment yaml right away. That way when the controller deployment is ready and started it already has all the certs available.Since the
che-workspace-controller-cert-gen
binary is so small it actually finishes running before the controller deployment even finishes getting setup. In the worst case, the controller deployment will block for 1-2 seconds (this is only theoretical as I've never actually seen it happen). When the controller starts setting up the webhooks (and the certs are available) it will delete theche-workspace-controller-cert-gen
deployment.Ideally, we'd use a Job for creating
che-workspace-controller-cert-gen
but since OLM doesn't allow you to specify jobs in the bundle, we will have to use deployment.What issues does this PR fix or reference?
Part of eclipse-che/che#16980
Is it tested? How?
make docker_cert
make docker
make deploy
with both webhooks on and then webhooks off