Skip to content

Commit

Permalink
corrected error msg (#2372)
Browse files Browse the repository at this point in the history
* corrected error msg

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* lintted

Signed-off-by: swastik959 <Sswastik959@gmail.com>

---------

Signed-off-by: swastik959 <Sswastik959@gmail.com>
  • Loading branch information
swastik959 committed Jun 20, 2024
1 parent 9b30089 commit 40eb0eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/knative/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,11 @@ func checkResourcesArePresent(ctx context.Context, namespace string, referencedS
for s := range *referencedSecrets {
_, err := k8s.GetSecret(ctx, s, namespace)
if err != nil {
errMsg += fmt.Sprintf(" referenced Secret \"%s\" is not present in namespace \"%s\"\n", s, namespace)
if errors.IsForbidden(err) {
errMsg += " Ensure that the service account has the necessary permissions to access the secret.\n"
} else {
errMsg += fmt.Sprintf(" referenced Secret \"%s\" is not present in namespace \"%s\"\n", s, namespace)
}
}
}

Expand Down

0 comments on commit 40eb0eb

Please sign in to comment.