-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Use url.JoinPath instead of fmt to concat endpoint #10917
Conversation
Signed-off-by: sivchari <shibuuuu5@gmail.com>
/asssign |
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
/assign |
Change looks okay so far, but I have a question:
Why should the endpoint be in format |
https://go.dev/play/p/pNz485g0Igc This CL is for improvement to make the endpoint safely. Since APIEndpoint is the field of CRD, the value that has prefix of |
/test pull-cluster-api-e2e-main |
Especially as this is an exported util, fine to make it more robust |
/lgtm |
LGTM label has been added. Git tree hash: 1ef26e897b53e3d664361e9c4146367d7da4344f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
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.
/retest
What this PR does / why we need it:
Currently, kubeadmconfg's endpoint is liked using fmt.Sprintf. But if the endpoint is
/host:port
, the result ishttps:///host:port
. So I use url.JoinPath to concat safely.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #