-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
kubeadm/join: expose the KubeConfigPath() method to joinData #74277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
thank you, one minor typo in a comment
This removal was fine, the problem is that the interface in
Removing Then, all references on this phase need adapting and calling directly to
The problem was that |
/retest
@ereslibre given the kubeconfig is used in more than one place in join.go and controlplanejoin.go i think it's fine to have the public joinData.KubeConfigPath() helper even if it only returns |
This fixes the following error: "error execution phase control-plane-join/etcd: control-plane-join phase invoked with an invalid data struct" The problem here is that joinData cannot be type-asserted to the interface type under controlplanejoin.go (controlPlaneJoinData) because joinData lacks KubeConfigPath. Given we use KubeConfigPath in more than one place for join it makes sense to define define the method and make it return: kubeadmconstants.GetAdminKubeConfigPath()
92dd37d
to
5db0c61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neolit123 thanks for the quick investigation on this problem
Eventually we will reconsider this in the audit of join phases
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This fixes the following error:
"error execution phase control-plane-join/etcd:
control-plane-join phase invoked with an invalid data struct"
The problem here is that joinData cannot be type-asserted
to the interface type under controlplanejoin.go (controlPlaneJoinData)
because joinData lacks KubeConfigPath.
Given we use KubeConfigPath in more than one place for join
it makes sense to define the method and make it return:
kubeadmconstants.GetAdminKubeConfigPath()
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
https://k8s-testgrid.appspot.com/sig-cluster-lifecycle-all#kubeadm-kind-master
Does this PR introduce a user-facing change?:
/kind bug
/priority critical-urgent
cc @fabriziopandini @RA489
cc @kubernetes/sig-cluster-lifecycle-pr-reviews