Skip to content
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

Service account printing extra steps #1262

Merged
merged 4 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/commands/rhoas_cluster_connect.adoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pkg/cmd/serviceaccount/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ func runCreate(opts *options) error {
return fmt.Errorf("%v: %w", opts.localizer.MustLocalize("serviceAccount.common.error.couldNotSaveCredentialsFile"), err)
}

opts.Logger.Info(icon.SuccessPrefix(), opts.localizer.MustLocalize("serviceAccount.common.log.info.credentialsSaved", localize.NewEntry("FilePath", color.CodeSnippet(opts.filename))))
opts.Logger.Info(icon.SuccessPrefix(), opts.localizer.MustLocalize("serviceAccount.common.log.info.credentialsSaved",
localize.NewEntry("FilePath", color.CodeSnippet(opts.filename)),
localize.NewEntry("ClientID", color.Success(creds.ClientID)),
))

return nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/localize/locales/en/cmd/cluster.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ the Service Binding operator (https://github.com/redhat-developer/service-bindin
NOTE: Created service account will need to be given permissions to specified service
For example for Kafka service you should execute the following command to grant access to the service account
$ rhoas kafka acl grant-access --producer --consumer --service-account your-sa --topic "*" --group "*"
$ rhoas kafka acl grant-access --producer --consumer --service-account your-sa --topic all --group all
'''

Expand Down Expand Up @@ -303,7 +303,7 @@ Make a copy of the client ID to store in a safe place. Credentials won't appear
You will need to assign permissions to service account in order to use it.
For example for Kafka service you should execute the following command to grant access to the service account:
$ rhoas kafka acl grant-access --producer --consumer --service-account {{.ClientID}} --topic "*" --group "*"
$ rhoas kafka acl grant-access --producer --consumer --service-account {{.ClientID}} --topic all --group all
'''


Expand Down
13 changes: 12 additions & 1 deletion pkg/localize/locales/en/cmd/serviceaccount.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ other = 'you are forbidden to {{.Operation}} these service accounts'

[serviceAccount.common.log.info.credentialsSaved]
description = 'Credentials file saved message'
one = 'Credentials saved to {{.FilePath}}'
one = '''Credentials saved to {{.FilePath}}
You can now set access rules for your current services.
To grant full access to produce and consume Kafka messages, enter this command:
$ rhoas kafka acl grant-access --producer --consumer --service-account {{.ClientID}} --topic all --group all
To grant read and write access to the currently selected Service Registry instance, enter this command:
$ rhoas service-registry role add --role DEVELOPER --service-account {{.ClientID}}
'''

[serviceAccount.common.input.credentialsFileLocation.message]
description = 'Input message for credentials file location'
Expand Down