-
Notifications
You must be signed in to change notification settings - Fork 78
fix: clarifies message error regards service account #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: clarifies message error regards service account #174
Conversation
pkg/validation/internal/bundle.go
Outdated
@@ -52,7 +52,10 @@ func validateServiceAccounts(bundle *manifests.Bundle) []errors.Error { | |||
sa := v1.ServiceAccount{} | |||
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &sa); err == nil { | |||
if _, ok := saNamesFromCSV[sa.Name]; ok { | |||
errs = append(errs, errors.ErrInvalidBundle("invalid service account found in bundle. sa name cannot match service account defined for deployment spec in CSV", sa.Name)) | |||
errs = append(errs, errors.ErrInvalidBundle(fmt.Sprintf("invalid service account found in bundle. " + | |||
"OLM cannot handle more than one Service Account defined with the same name. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message is probably going to also be confusing for users. It's not really that OLM can't handle multiple service accounts with more than one name, it's that kubernetes doesn't let you name multiple service accounts with the same name.
Something like
"This service account $SANAME in your bundle is not valid, because a service account with the same name was already specified in your CSV. If this was unintentional, please remove the service account manifest from your bundle. If it was intentional to specify a separate service account, please rename the SA in either the bundle manifest or the CSV."
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, kevinrizza The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
…ork#174) * fix: clarifies message error regards service account * apply suggestions
Description
Clarifies error message for service account