@@ -12,10 +12,6 @@ import (
12
12
"encoding/gob"
13
13
"flag"
14
14
"fmt"
15
- corev1 "k8s.io/api/core/v1"
16
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
17
- "k8s.io/apimachinery/pkg/types"
18
- "k8s.io/apimachinery/pkg/util/yaml"
19
15
"os"
20
16
"path/filepath"
21
17
"slices"
@@ -25,8 +21,12 @@ import (
25
21
26
22
. "github.com/onsi/ginkgo/v2"
27
23
. "github.com/onsi/gomega"
24
+ corev1 "k8s.io/api/core/v1"
28
25
storagev1 "k8s.io/api/storage/v1"
26
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
29
27
"k8s.io/apimachinery/pkg/runtime"
28
+ "k8s.io/apimachinery/pkg/types"
29
+ "k8s.io/apimachinery/pkg/util/yaml"
30
30
"k8s.io/klog/v2"
31
31
capie2e "sigs.k8s.io/cluster-api/test/e2e"
32
32
capie2eframework "sigs.k8s.io/cluster-api/test/framework"
@@ -130,13 +130,24 @@ var _ = SynchronizedBeforeSuite(func() []byte {
130
130
err = decode .Decode (& configMap )
131
131
Expect (err ).To (BeNil (), "Failed to decode the yaml file into a Kubernetes object" )
132
132
133
- _ , err = bootstrapClusterProxy .GetClientSet ().CoreV1 ().ConfigMaps (configMap .GetNamespace ()).Update (context .Background (), configMap , metav1.UpdateOptions {})
134
- Expect (err ).To (BeNil (), "Failed to update the coredns deployment with the dns-override.yaml file" )
133
+ _ , err = bootstrapClusterProxy .GetClientSet ().
134
+ CoreV1 ().
135
+ ConfigMaps (configMap .GetNamespace ()).
136
+ Update (context .Background (), configMap , metav1.UpdateOptions {})
137
+ Expect (
138
+ err ,
139
+ ).To (BeNil (), "Failed to update the coredns deployment with the dns-override.yaml file" )
135
140
136
141
timeNow := time .Now ().Format (time .RFC3339 )
137
- patch := fmt .Sprintf (`{"spec":{"template":{"metadata":{"annotations":{"kubectl.kubernetes.io/restartedAt":"%s"}}}}}` , timeNow )
142
+ patch := fmt .Sprintf (
143
+ `{"spec":{"template":{"metadata":{"annotations":{"kubectl.kubernetes.io/restartedAt":%q}}}}}` ,
144
+ timeNow ,
145
+ )
138
146
139
- _ , err = bootstrapClusterProxy .GetClientSet ().AppsV1 ().Deployments ("kube-system" ).Patch (context .Background (), "coredns" , types .StrategicMergePatchType , []byte (patch ), metav1.PatchOptions {})
147
+ _ , err = bootstrapClusterProxy .GetClientSet ().
148
+ AppsV1 ().
149
+ Deployments ("kube-system" ).
150
+ Patch (context .Background (), "coredns" , types .StrategicMergePatchType , []byte (patch ), metav1.PatchOptions {})
140
151
Expect (err ).To (BeNil (), "Failed to restart the coredns deployment" )
141
152
142
153
By ("Initializing the bootstrap cluster" )
@@ -268,7 +279,6 @@ func setupBootstrapCluster(
268
279
Expect (
269
280
kubeconfigPath ,
270
281
).To (BeAnExistingFile (), "Failed to get the kubeconfig file for the bootstrap cluster" )
271
-
272
282
} else {
273
283
// Loading image for already created cluster
274
284
imagesInput := capibootstrap.LoadImagesToKindClusterInput {
0 commit comments