@@ -103,12 +103,12 @@ func TestCompileManifests(t *testing.T) {
103
103
{
104
104
manifest : KubeProxyConfigMap19 ,
105
105
data : struct {
106
- MasterEndpoint , ProxyConfig , ProxyConfigMap , ProxyConfigMapKey string
106
+ ControlPlaneEndpoint , ProxyConfig , ProxyConfigMap , ProxyConfigMapKey string
107
107
}{
108
- MasterEndpoint : "foo" ,
109
- ProxyConfig : " bindAddress: 0.0.0.0\n clusterCIDR: 192.168.1.1\n enableProfiling: false" ,
110
- ProxyConfigMap : "bar" ,
111
- ProxyConfigMapKey : "baz" ,
108
+ ControlPlaneEndpoint : "foo" ,
109
+ ProxyConfig : " bindAddress: 0.0.0.0\n clusterCIDR: 192.168.1.1\n enableProfiling: false" ,
110
+ ProxyConfigMap : "bar" ,
111
+ ProxyConfigMapKey : "baz" ,
112
112
},
113
113
expected : true ,
114
114
},
@@ -140,7 +140,7 @@ func TestEnsureProxyAddon(t *testing.T) {
140
140
const (
141
141
NoError SimulatedError = iota
142
142
ServiceAccountError
143
- InvalidMasterEndpoint
143
+ InvalidControlPlaneEndpoint
144
144
IPv6SetBindAddress
145
145
)
146
146
@@ -177,7 +177,7 @@ func TestEnsureProxyAddon(t *testing.T) {
177
177
// Create a fake client and set up default test configuration
178
178
client := clientsetfake .NewSimpleClientset ()
179
179
// TODO: Consider using a YAML file instead for this that makes it possible to specify YAML documents for the ComponentConfigs
180
- masterConfig := & kubeadmapiv1beta1.InitConfiguration {
180
+ controlPlaneConfig := & kubeadmapiv1beta1.InitConfiguration {
181
181
LocalAPIEndpoint : kubeadmapiv1beta1.APIEndpoint {
182
182
AdvertiseAddress : "1.2.3.4" ,
183
183
BindPort : 1234 ,
@@ -197,19 +197,19 @@ func TestEnsureProxyAddon(t *testing.T) {
197
197
client .PrependReactor ("create" , "serviceaccounts" , func (action core.Action ) (bool , runtime.Object , error ) {
198
198
return true , nil , apierrors .NewUnauthorized ("" )
199
199
})
200
- case InvalidMasterEndpoint :
201
- masterConfig .LocalAPIEndpoint .AdvertiseAddress = "1.2.3"
200
+ case InvalidControlPlaneEndpoint :
201
+ controlPlaneConfig .LocalAPIEndpoint .AdvertiseAddress = "1.2.3"
202
202
case IPv6SetBindAddress :
203
- masterConfig .LocalAPIEndpoint .AdvertiseAddress = "1:2::3:4"
204
- masterConfig .Networking .PodSubnet = "2001:101::/96"
203
+ controlPlaneConfig .LocalAPIEndpoint .AdvertiseAddress = "1:2::3:4"
204
+ controlPlaneConfig .Networking .PodSubnet = "2001:101::/96"
205
205
}
206
206
207
- intMaster , err := configutil .DefaultedInitConfiguration (masterConfig )
207
+ intControlPlane , err := configutil .DefaultedInitConfiguration (controlPlaneConfig )
208
208
if err != nil {
209
209
t .Errorf ("test failed to convert external to internal version" )
210
210
break
211
211
}
212
- intMaster .ComponentConfigs .KubeProxy = & kubeproxyconfig.KubeProxyConfiguration {
212
+ intControlPlane .ComponentConfigs .KubeProxy = & kubeproxyconfig.KubeProxyConfiguration {
213
213
BindAddress : "" ,
214
214
HealthzBindAddress : "0.0.0.0:10256" ,
215
215
MetricsBindAddress : "127.0.0.1:10249" ,
@@ -222,11 +222,11 @@ func TestEnsureProxyAddon(t *testing.T) {
222
222
},
223
223
}
224
224
// Run dynamic defaulting again as we changed the internal cfg
225
- if err := configutil .SetInitDynamicDefaults (intMaster ); err != nil {
225
+ if err := configutil .SetInitDynamicDefaults (intControlPlane ); err != nil {
226
226
t .Errorf ("test failed to set dynamic defaults: %v" , err )
227
227
break
228
228
}
229
- err = EnsureProxyAddon (& intMaster .ClusterConfiguration , & intMaster .LocalAPIEndpoint , client )
229
+ err = EnsureProxyAddon (& intControlPlane .ClusterConfiguration , & intControlPlane .LocalAPIEndpoint , client )
230
230
231
231
// Compare actual to expected errors
232
232
actErr := "No error"
@@ -244,17 +244,17 @@ func TestEnsureProxyAddon(t *testing.T) {
244
244
expErr ,
245
245
actErr )
246
246
}
247
- if intMaster .ComponentConfigs .KubeProxy .BindAddress != tc .expBindAddr {
247
+ if intControlPlane .ComponentConfigs .KubeProxy .BindAddress != tc .expBindAddr {
248
248
t .Errorf ("%s test failed, expected: %s, got: %s" ,
249
249
tc .name ,
250
250
tc .expBindAddr ,
251
- intMaster .ComponentConfigs .KubeProxy .BindAddress )
251
+ intControlPlane .ComponentConfigs .KubeProxy .BindAddress )
252
252
}
253
- if intMaster .ComponentConfigs .KubeProxy .ClusterCIDR != tc .expClusterCIDR {
253
+ if intControlPlane .ComponentConfigs .KubeProxy .ClusterCIDR != tc .expClusterCIDR {
254
254
t .Errorf ("%s test failed, expected: %s, got: %s" ,
255
255
tc .name ,
256
256
tc .expClusterCIDR ,
257
- intMaster .ComponentConfigs .KubeProxy .ClusterCIDR )
257
+ intControlPlane .ComponentConfigs .KubeProxy .ClusterCIDR )
258
258
}
259
259
}
260
260
}
0 commit comments