mirror of https://github.com/knative/func.git
corrected error msg (#2372)
* 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>
This commit is contained in:
parent
9b30089a00
commit
40eb0eb304
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue