Add support for external etcd cluster#1165
Conversation
|
Good stuff. I'm thinking if it would be neater if instead of the |
|
Thanks for your feedback. I decided to wrap Additionally, wrapper object On the other hand, why a user would want to set custom prefix or client cert for the internal cluster? I think that internal etcd should be managed only by k0s to keep it as simple as possible. |
I agree with this, there's no need to complicate things for the k0s managed etcd case.
prefix maybe. client cert really by itself not, as k0s managed etcd will need lot more certs than only the client cert |
|
@jnummelin @kke, we have to find a common approach to the new API. Please share your opinion and vote for preferred option.
In my opinion the first option gives more context and is more intuitive, so I vote for the first option. Other questions:
|
I agree, feels more intuitive IMO too.
Theoretically one can configure etcd not to use any TLS, I don't think many people do it though. So I'd say they can be optional.
Yes, I agree.
I do not know any use case where this would be required. So IMO ok to have it only on the
Both |
|
This PR is almost ready. I tested k0s with external cluster with and without TLS and everything works fine. I’m going to add some additional unit tests and to check error messages from |
6a69731 to
546501b
Compare
|
This pull request does not include documentation and smoke tests, but I'm going to add both these things in subsequent pull requests. If you want to test this feature, you can use my k0s-sandbox repository that contains vagrant-based setups of k0s. |
|
@jewertow can I ask you to rebase over upstream? I am afraid GHA won't start on the outdated branch |
1444f31 to
4be9a06
Compare
|
Rebased |
Would be great to have e2e test suite as a part of this PR, it's usual practice in the project to cover new features with tests originally to not let techdebt growing. |
|
Ok, I will add some e2e tests. |
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
|
@jewertow hello! Do you have any updates on this? |
4be9a06 to
fc6c566
Compare
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
348d51c to
60515a0
Compare
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
Signed-off-by: Jacek Ewertowski <jacek.ewertowski1@gmail.com>
|
This pull request is still missing a test case for external etcd with enabled TLS. I tested such a case manually on VMs and it works fine, but unfortunately I have no time this week to implement this test. I can implement this test next week. What do you think? Is it acceptable for you? |
211174b to
39afd19
Compare
Signed-off-by: Jacek Ewertowski jacek.ewertowski1@gmail.com
Issue
Fixes #1010
What this PR Includes
This PR aims to enable users to use external etcd cluster as a storage for k0s. To do that a user has to define the following configuration:
Field
endpointscontains list of URLs that listen on for client requests.etcdPrefixis used to enable multi-tenancy in etcd and specifies the name of the root path which by default is/registry; this value will be used to pass as--etcd-prefixargument in kube-apiserver.Changes
ClusterConfigCRD withetcd.externalClusteroption.TODO:
etcd.externalClusteris defined.EtcdClient.--etcd-prefixargument.