Merge pull request #5350 from gambol99/filepath_join

Code Clean
This commit is contained in:
k8s-ci-robot 2018-06-19 15:15:31 -07:00 committed by GitHub
commit 122d705143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ limitations under the License.
package model
import (
"fmt"
"path/filepath"
"k8s.io/kops/upup/pkg/fi"
)
@ -35,9 +35,9 @@ func (b *CalicoBuilder) Build(c *fi.ModelBuilderContext) error {
if b.UseEtcdTLS() {
name := "calico-client"
dirname := "calico"
ca := fmt.Sprintf("%s/ca.pem", dirname)
certificate := fmt.Sprintf("%s/%s.pem", dirname, name)
key := fmt.Sprintf("%s/%s-key.pem", dirname, name)
ca := filepath.Join(dirname, "ca.pem")
certificate := filepath.Join(dirname, name+".pem")
key := filepath.Join(dirname, name+"-key.pem")
if err := b.BuildCertificateTask(c, name, certificate); err != nil {
return err