From bc1b57ede812ccba81bb7a8ca13999d62abbfc7f Mon Sep 17 00:00:00 2001 From: sivakumar subraani Date: Wed, 11 Oct 2023 15:23:33 +0000 Subject: [PATCH] pb-4579: Added check to ignore sseTypePath secret file as it is optional. --- pkg/executor/common.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/executor/common.go b/pkg/executor/common.go index cc2aad93f..41f3a6845 100644 --- a/pkg/executor/common.go +++ b/pkg/executor/common.go @@ -349,9 +349,12 @@ func parseS3Creds() (*Repository, error) { sseType, err := os.ReadFile(sseTypePath) if err != nil { - errMsg := fmt.Sprintf("failed reading data from file %s : %s", sseTypePath, err) - logrus.Errorf("%v", errMsg) - return nil, fmt.Errorf(errMsg) + // sseTypePath field in the secret is optional, So ignoring if the file does not exists. + if !os.IsNotExist(err) { + errMsg := fmt.Sprintf("failed reading data from file %s : %s", sseTypePath, err) + logrus.Errorf("%v", errMsg) + return nil, fmt.Errorf(errMsg) + } } disableSsl, err := os.ReadFile(disableSslPath)