-
Notifications
You must be signed in to change notification settings - Fork 895
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
Fix ETCD PKI provisioning Issue in Karmada Operator #5975
Comments
Hey @RainbowMango . I just submitted a PR for this. Can you please take a look? |
Sure, I am working on it. |
I agree that in external ETCD mode, we don't need to generate PKI for in-cluster ETCD. |
/assign @jabellard |
Great question. The name of the secret that holds the cert for the external ETCD instance must adhere to a convention that's enforced by the operator. If we don't skip generating PKI for an in-cluster instance in external mode, then the operator will overwrite the data in that secret with data for the cert it needlessly generates. |
Oh, that sounds bad. That means people can not use the external ETCD when provisioning a Karmada instance, isn't it? |
Yeah. That's the issue. |
That's surprising, this issue was supposed to be discovered earlier when we implemented this feature at #5242. |
By the way, are you back from Christmas vacation? I know a lot of guys will take 1~2 weeks off. |
I agree. I was also surprised to see that. E2E testing worked perfectly fine before we imposed the naming convention at some point for the external secret so that it has the exact same name as the secret that would be generated in in-cluster mode. I think this slipped through around that time. |
Found some free time today to do some coding. Will be back from vacation first week of next year. |
OK. I will investigate it further and then back to #5976. I want to know exactly which PR breaks this. |
@jabellard I combs through this issue and please correct me if there is anything incorrect or incomplete. In #5699, the API karmada/operator/pkg/tasks/init/upload.go Lines 246 to 260 in e8a6ab3
karmada/operator/pkg/util/naming.go Lines 37 to 40 in e8a6ab3
This results in the content of the secret specified by |
Thanks @zhzhuang-zju for the clarification. The issue was leaked due to a lack of E2E test coverage. |
What happened:
When provisioning a Karmada instance to be managed by the Karmada operator, there's support for both in-cluster and external ETCD modes. When external ETCD mode is used, the operator should skip setting up an in-cluster ETCD instance, which entails setting up PKI for the instance and deploying it as a stateful set. However, currently, in external ETCD mode, the operator will skip deploying the stateful set, but will still generate PKI, which is an issue. In external ETCD mode, all tasks relevant to setting up an in-cluster instance should be skipped.
What you expected to happen:
In external ETCD mode, all tasks relevant to setting up an in-cluster ETCD instance, including setting up PKI for the instance, should be skipped.
How to reproduce it (as minimally and precisely as possible):
Try to provision a new control plane using an external ETCD instance via the Karmada operator.
Anything else we need to know?:
Environment:
kubectl-karmada version
orkarmadactl version
): N/AThe text was updated successfully, but these errors were encountered: