mirror of https://github.com/kubernetes/kops.git
Code Clean
- just cleaning up the path concat to use filepath.Join() rather then string formats
This commit is contained in:
parent
598d1c29cd
commit
61a3e29b67
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"path/filepath"
|
||||||
|
|
||||||
"k8s.io/kops/upup/pkg/fi"
|
"k8s.io/kops/upup/pkg/fi"
|
||||||
)
|
)
|
||||||
|
|
@ -35,9 +35,9 @@ func (b *CalicoBuilder) Build(c *fi.ModelBuilderContext) error {
|
||||||
if b.UseEtcdTLS() {
|
if b.UseEtcdTLS() {
|
||||||
name := "calico-client"
|
name := "calico-client"
|
||||||
dirname := "calico"
|
dirname := "calico"
|
||||||
ca := fmt.Sprintf("%s/ca.pem", dirname)
|
ca := filepath.Join(dirname, "ca.pem")
|
||||||
certificate := fmt.Sprintf("%s/%s.pem", dirname, name)
|
certificate := filepath.Join(dirname, name+".pem")
|
||||||
key := fmt.Sprintf("%s/%s-key.pem", dirname, name)
|
key := filepath.Join(dirname, name+"-key.pem")
|
||||||
|
|
||||||
if err := b.BuildCertificateTask(c, name, certificate); err != nil {
|
if err := b.BuildCertificateTask(c, name, certificate); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue