File tree 4 files changed +50
-6
lines changed
4 files changed +50
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ localAPIEndpoint:
42
42
bootstrapTokens:
43
43
- token: "abcdef.0123456789abcdef"
44
44
nodeRegistration:
45
- criSocket: unix:///var/run/containerd/containerd.sock
45
+ criSocket: %s
46
46
name: someName
47
47
ignorePreflightErrors:
48
48
- c
@@ -51,7 +51,7 @@ nodeRegistration:
51
51
apiVersion: %[1]s
52
52
kind: ClusterConfiguration
53
53
controlPlaneEndpoint: "3.4.5.6"
54
- ` , kubeadmapiv1 .SchemeGroupVersion .String ())
54
+ ` , kubeadmapiv1 .SchemeGroupVersion .String (), expectedCRISocket )
55
55
56
56
func TestNewInitData (t * testing.T ) {
57
57
// create temp directory
@@ -113,7 +113,7 @@ func TestNewInitData(t *testing.T) {
113
113
cfg : & kubeadmapi.InitConfiguration {
114
114
NodeRegistration : kubeadmapi.NodeRegistrationOptions {
115
115
Name : "somename" ,
116
- CRISocket : "unix:///var/run/containerd/containerd.sock" ,
116
+ CRISocket : expectedCRISocket ,
117
117
IgnorePreflightErrors : []string {"c" , "d" },
118
118
ImagePullPolicy : "IfNotPresent" ,
119
119
},
Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ discovery:
48
48
controlPlane:
49
49
certificateKey: c39a18bae4a72e71b178661f437363da218a3efb83ddb03f1cd91d9ae1da41bd
50
50
nodeRegistration:
51
- criSocket: unix:///var/run/containerd/containerd.sock
51
+ criSocket: %s
52
52
name: someName
53
53
ignorePreflightErrors:
54
54
- c
55
55
- d
56
- ` , kubeadmapiv1 .SchemeGroupVersion .String ())
56
+ ` , kubeadmapiv1 .SchemeGroupVersion .String (), expectedCRISocket )
57
57
58
58
func TestNewJoinData (t * testing.T ) {
59
59
// create temp directory
@@ -218,7 +218,7 @@ func TestNewJoinData(t *testing.T) {
218
218
TypeMeta : metav1.TypeMeta {Kind : "" , APIVersion : "" },
219
219
NodeRegistration : kubeadmapi.NodeRegistrationOptions {
220
220
Name : "somename" ,
221
- CRISocket : "unix:///var/run/containerd/containerd.sock" ,
221
+ CRISocket : expectedCRISocket ,
222
222
IgnorePreflightErrors : []string {"c" , "d" },
223
223
ImagePullPolicy : "IfNotPresent" ,
224
224
Taints : []v1.Taint {{Key : "node-role.kubernetes.io/control-plane" , Effect : "NoSchedule" }},
Original file line number Diff line number Diff line change
1
+ //go:build !windows
2
+ // +build !windows
3
+
4
+ /*
5
+ Copyright 2023 The Kubernetes Authors.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+ */
19
+
20
+ package cmd
21
+
22
+ const expectedCRISocket = "unix://var/run/containerd/containerd.sock"
Original file line number Diff line number Diff line change
1
+ //go:build windows
2
+ // +build windows
3
+
4
+ /*
5
+ Copyright 2023 The Kubernetes Authors.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+ */
19
+
20
+ package cmd
21
+
22
+ const expectedCRISocket = "npipe://./pipe/containerd-containerd"
You can’t perform that action at this time.
0 commit comments