-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add MutatingWebhookConfiguration objects to install YAML #2176
Comments
Relates to #2164. |
I think the way this should work is that at install time, Linkerd install would generate a root CA and key, create the MWC with the CA (trust root) and save the key into a secret. When a webhook instance starts up, it should load the CA key from the secret, generate a serving key and CSR, and use the CA key to generate a serving cert. The same approach should be used for validating webhooks and for api extensions. This is a prerequisite to running any of these in HA mode. Does this seem right? |
How would this interact with |
@adleong Your reasoning sounds right to me. As for |
I agree that in HA mode the root CA needs to be persisted. I'm not sure about persisting the key though, because we have a
If other components will be sharing this CA, it cannot be saved in the MWC, because the MWC gets re-created everytime the webhook is restarted. See #2425. |
In HA mode, there will be one MWC and multiple webhook pods. This means that all pods must be serving using certificates signed by the same CA. When a webhook pod starts up, we dont want to regenerate the MWC because changing the CA cert in the MWC will mean that other pods will no longer be serving certs signed by the new CA. When a webhook pods starts up, it needs to get a certificate signed by the CA. This is only possible by using the CA's private key. This is why we have to persist that private key in a secret rather than generating a new one for each pod. Does this make sense? |
Per slack convo with @adleong, we can't assume that the MWC and VWC won't get regenerated, especially during upgrade. It will make sense to save the CA cert in the And yes, the CA private key needs to be saved because the |
I've been hesitant about the key being in secrets, got talked into it yesterday. It does suggest that we want to strongly encourage folks to install the control plane into its own namespace, even if it isn't named |
Now that #2163 has merged, the way in which the proxy-injector's MutatingWebhookConfig is provisioned is much simpler. It now works as follows:
linkerd install --proxy-auto-inject
emits the config for the proxy-injector podThis means that our install YAML does not include the MWC itself, since it's created programmatically after the proxy-injector pod starts. Ideally, however, the install YAML would include all objects that are actually installed, including the MWC. But this would require the CLI to create the bundle at install time and provide it as a secret to the linkerd-proxy-injector pod.
The text was updated successfully, but these errors were encountered: