fix(tls): support auto and cert-manager TLS configs for customized controller#428
fix(tls): support auto and cert-manager TLS configs for customized controller#428silentred wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: silentred The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
516ff10 to
5fe7092
Compare
|
@silentred I haven't reviewed this PR yet. Please consider breaking down such a huge PR into smaller ones as much as you can. Pls try to fix each relatively independent thing in a separate smaller PR. thx |
OK, I will try to break it down after making e2e test passed. |
…ntroller Signed-off-by: shenmu.wy <shenmu.wy@antfin.com>
|
@silentred: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
seperated to 5 sub-tasks:
|
Summary
This PR wires up TLS support on the customized controller so that TLS-enabled etcd clusters can be created successfully. It targets the customized-controller branch and addresses #409.
I tested both the
autoandcert-managerTLS configuration types, and both can create a TLS-enabled etcd cluster correctly.Notes
time.ParseDuration cannot parse strings like 365d; v0.2.0 produces the same error. This is by design in the Go standard library — see golang/go#17767.
To make the sample YAML work out of the box, I changed validityDuration to 8760h (= 365 × 24h). With this value, the sample YAML creates an etcd cluster successfully.
If support for parsing the
dsuffix is desired, it can be addressed in a follow-up PR.Currently the controller uses the server TLS certificate as the etcd client certificate to talk to the etcd server; it does not use client TLS.
Because the client ca.crt is issued by an independent CA and is not included in the etcd server's --trusted-ca-file, client TLS cannot complete a handshake with the etcd server today.
Future work: bundle the client CA together with the server CA and add the bundle to the etcd server's trust chain (--trusted-ca-file). Once that is in place, client TLS will be able to communicate with the etcd server normally.
/cc @ahrtr @nwnt