From c09d2f9a4fa27a3d4dec13935507db342bb4c90c Mon Sep 17 00:00:00 2001 From: JenTing Hsiao Date: Thu, 15 Dec 2022 05:06:47 +0000 Subject: [PATCH] Check secret key credentials Signed-off-by: JenTing Hsiao --- install/installer/pkg/config/v1/validation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/installer/pkg/config/v1/validation.go b/install/installer/pkg/config/v1/validation.go index 186b650e3b118a..25accefba77e6d 100644 --- a/install/installer/pkg/config/v1/validation.go +++ b/install/installer/pkg/config/v1/validation.go @@ -150,9 +150,9 @@ func (v version) ClusterValidation(rcfg interface{}) cluster.ValidationChecks { secretName := cfg.ContainerRegistry.External.Certificate.Name res = append(res, cluster.CheckSecret(secretName, cluster.CheckSecretRequiredData(".dockerconfigjson"))) - if cfg.ContainerRegistry.External != nil { + if cfg.ContainerRegistry.External.Credentials != nil { credSecretName := cfg.ContainerRegistry.External.Credentials.Name - res = append(res, cluster.CheckSecret(credSecretName, cluster.CheckSecretRequiredData("accessKeyId", "secretAccessKey"))) + res = append(res, cluster.CheckSecret(credSecretName, cluster.CheckSecretRequiredData("credentials"))) } }