node-conformance-e2e: restart the kubelet after loading credential config

Signed-off-by: Stanislav Láznička <slznika@microsoft.com>
This commit is contained in:
Stanislav Láznička
2025-11-05 15:32:18 +01:00
committed by Anish Ramasekar
parent 609e2e57da
commit ad0a3de152

View File

@@ -76,7 +76,7 @@ var _ = SIGDescribe("Container Runtime Conformance Test", func() {
})
})
f.It(testCase.description+"", f.WithNodeConformance(), f.WithFlaky() /* https://github.com/kubernetes/kubernetes/issues/134998 */, func(ctx context.Context) {
f.It(testCase.description+"", f.WithNodeConformance(), f.WithSerial(), func(ctx context.Context) {
name := "image-pull-test"
container := node.ConformanceContainer{
PodClient: e2epod.NewPodClient(f),
@@ -94,6 +94,10 @@ var _ = SIGDescribe("Container Runtime Conformance Test", func() {
auth := e2eregistry.User1DockerSecret(registryAddress).Data[v1.DockerConfigJsonKey]
configFile := filepath.Join(services.KubeletRootDirectory, "config.json")
// the kubelet would cache the config for 5 minutes, let's restart instead
restartKubelet(context.Background(), true)
err := os.WriteFile(configFile, []byte(auth), 0644)
framework.ExpectNoError(err)
ginkgo.DeferCleanup(func() { framework.ExpectNoError(os.Remove(configFile)) })