@@ -25,7 +25,7 @@ import (
25
25
"crypto/x509/pkix"
26
26
"encoding/hex"
27
27
"math/big"
28
- "path/filepath "
28
+ "path"
29
29
"strings"
30
30
"time"
31
31
@@ -73,25 +73,25 @@ func NewCertificatesForInitialControlPlane(config *bootstrapv1.ClusterConfigurat
73
73
certificates := Certificates {
74
74
& Certificate {
75
75
Purpose : ClusterCA ,
76
- CertFile : filepath .Join (certificatesDir , "ca.crt" ),
77
- KeyFile : filepath .Join (certificatesDir , "ca.key" ),
76
+ CertFile : path .Join (certificatesDir , "ca.crt" ),
77
+ KeyFile : path .Join (certificatesDir , "ca.key" ),
78
78
},
79
79
& Certificate {
80
80
Purpose : ServiceAccount ,
81
- CertFile : filepath .Join (certificatesDir , "sa.pub" ),
82
- KeyFile : filepath .Join (certificatesDir , "sa.key" ),
81
+ CertFile : path .Join (certificatesDir , "sa.pub" ),
82
+ KeyFile : path .Join (certificatesDir , "sa.key" ),
83
83
},
84
84
& Certificate {
85
85
Purpose : FrontProxyCA ,
86
- CertFile : filepath .Join (certificatesDir , "front-proxy-ca.crt" ),
87
- KeyFile : filepath .Join (certificatesDir , "front-proxy-ca.key" ),
86
+ CertFile : path .Join (certificatesDir , "front-proxy-ca.crt" ),
87
+ KeyFile : path .Join (certificatesDir , "front-proxy-ca.key" ),
88
88
},
89
89
}
90
90
91
91
etcdCert := & Certificate {
92
92
Purpose : EtcdCA ,
93
- CertFile : filepath .Join (certificatesDir , "etcd" , "ca.crt" ),
94
- KeyFile : filepath .Join (certificatesDir , "etcd" , "ca.key" ),
93
+ CertFile : path .Join (certificatesDir , "etcd" , "ca.crt" ),
94
+ KeyFile : path .Join (certificatesDir , "etcd" , "ca.key" ),
95
95
}
96
96
97
97
// TODO make sure all the fields are actually defined and return an error if not
@@ -124,24 +124,24 @@ func NewControlPlaneJoinCerts(config *bootstrapv1.ClusterConfiguration) Certific
124
124
certificates := Certificates {
125
125
& Certificate {
126
126
Purpose : ClusterCA ,
127
- CertFile : filepath .Join (certificatesDir , "ca.crt" ),
128
- KeyFile : filepath .Join (certificatesDir , "ca.key" ),
127
+ CertFile : path .Join (certificatesDir , "ca.crt" ),
128
+ KeyFile : path .Join (certificatesDir , "ca.key" ),
129
129
},
130
130
& Certificate {
131
131
Purpose : ServiceAccount ,
132
- CertFile : filepath .Join (certificatesDir , "sa.pub" ),
133
- KeyFile : filepath .Join (certificatesDir , "sa.key" ),
132
+ CertFile : path .Join (certificatesDir , "sa.pub" ),
133
+ KeyFile : path .Join (certificatesDir , "sa.key" ),
134
134
},
135
135
& Certificate {
136
136
Purpose : FrontProxyCA ,
137
- CertFile : filepath .Join (certificatesDir , "front-proxy-ca.crt" ),
138
- KeyFile : filepath .Join (certificatesDir , "front-proxy-ca.key" ),
137
+ CertFile : path .Join (certificatesDir , "front-proxy-ca.crt" ),
138
+ KeyFile : path .Join (certificatesDir , "front-proxy-ca.key" ),
139
139
},
140
140
}
141
141
etcdCert := & Certificate {
142
142
Purpose : EtcdCA ,
143
- CertFile : filepath .Join (certificatesDir , "etcd" , "ca.crt" ),
144
- KeyFile : filepath .Join (certificatesDir , "etcd" , "ca.key" ),
143
+ CertFile : path .Join (certificatesDir , "etcd" , "ca.crt" ),
144
+ KeyFile : path .Join (certificatesDir , "etcd" , "ca.key" ),
145
145
}
146
146
147
147
// TODO make sure all the fields are actually defined and return an error if not
@@ -167,7 +167,7 @@ func NewControlPlaneJoinCerts(config *bootstrapv1.ClusterConfiguration) Certific
167
167
// NewCertificatesForWorker return an initialized but empty set of CA certificates needed to bootstrap a cluster.
168
168
func NewCertificatesForWorker (caCertPath string ) Certificates {
169
169
if caCertPath == "" {
170
- caCertPath = filepath .Join (DefaultCertificatesDir , "ca.crt" )
170
+ caCertPath = path .Join (DefaultCertificatesDir , "ca.crt" )
171
171
}
172
172
173
173
return Certificates {
0 commit comments