-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Generation of certificates and keys for etcd gated if etcd is disabled. #6998
Generation of certificates and keys for etcd gated if etcd is disabled. #6998
Conversation
Thanks for the PR! Have you checked to see what happens if you later enable etcd by restarting K3s with |
Thanks for the suggestion, I haven't checked that scenario but I am on my way... |
232cc1e
to
f3d21fd
Compare
TEST: (tested on Ubuntu 20.04 focal inside docker containers I've created a docker network and run the k3s servers in two separate containers: Build k3s for development:
Network:
Running the first container:
Run the second container:
The First container:
The Second container:
Connection succeeded.
Restarts and generates servers etcd certs. Creating k3s server succeeded. |
What you'd want to test is:
I am a little concerned that if the etcd CA certs don't exist when the datastore is initialized, they won't get put into it and the second server will fail to join. |
Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]> refactor
f3d21fd
to
38a6e2b
Compare
I'm not sure that I followed exactly what you meant.
|
For step 3, you have conflicting Steps should be:
|
@dereknola thanks for the correction. I did a test according to your suggestion and the behaviour is the same with and without changes from this PR. |
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]>
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]>
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]>
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]> Signed-off-by: Derek Nola <[email protected]>
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]> Signed-off-by: Derek Nola <[email protected]>
…d. (k3s-io#6998) Problem: When support for etcd was added in 3957142, generation of certificates and keys for etcd was not gated behind use of managed etcd. Keys are generated and distributed across servers even if managed etcd is not enabled. Solution: Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag. Signed-off-by: Bartossh <[email protected]> Signed-off-by: Derek Nola <[email protected]>
Problem:
When support for
etcd
was added in 3957142, the generation of certificates and keys foretcd
was not gated behind the use of managedetcd
. Keys are generated and distributed across servers even if managedetcd
is not enabled.Solution:
Allow generation of certificates and keys only if managed etc is enabled. Check config.DisableETCD flag.
Proposed Changes
Gate generating ETCD Certificates by checking
config.DisableETCD
flag.Types of Changes
Bugfix
Verification
When running
k3s server
provide--disable-etcd
flagTesting
There are no unit tests present.
Linked Issues
Related issue
User-Facing Change
No user-facing changes in that PR.
Further Comments
Trivial change.