Skip to content

Commit

Permalink
Merge pull request #315 from portworx/pb-4579-1
Browse files Browse the repository at this point in the history
pb-4579: Added check to ignore sseTypePath secret file as it is optional
  • Loading branch information
siva-portworx authored Oct 11, 2023
2 parents 1595007 + bc1b57e commit 1701f8d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/executor/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1701f8d

Please sign in to comment.