-
Notifications
You must be signed in to change notification settings - Fork 4.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
Node Bootstrap Fix Ups #5309
Node Bootstrap Fix Ups #5309
Conversation
gambol99
commented
Jun 11, 2018
- following the suggestions made in the initial PR Node Bootstrap Tokens #5253
- fixing up the variable name to following a more suitable convention
- fixing up the paths to use a strings.Join rather than a fiddly
/assign @justinsb ... adding the suggestions made in the original PR |
/test pull-kops-verify-gofmt |
/test pull-kops-verify-govet |
@@ -313,8 +313,8 @@ func (c *NodeupModelContext) KubectlPath() string { | |||
|
|||
// BuildCertificatePairTask creates the tasks to pull down the certificate and private key | |||
func (c *NodeupModelContext) BuildCertificatePairTask(ctx *fi.ModelBuilderContext, key, path, filename string) error { | |||
certificateName := fmt.Sprintf("%s/%s.pem", strings.TrimSuffix(path, "/"), filename) | |||
keyName := fmt.Sprintf("%s/%s-key.pem", strings.TrimSuffix(path, "/"), filename) | |||
certificateName := strings.Join([]string{path, filename + ".pem"}, "/") |
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.
I actually meant filepath.Join
https://golang.org/pkg/path/filepath/#Join but this works...
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.
aahh .. didn't know there was a filepath.Join
.. actually that's better as does Clean() for us .. no need to Trim
/approve Thanks @gambol99 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gambol99, justinsb 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 |