diff --git a/pkg/cluster/connect.go b/pkg/cluster/connect.go index 9e139fa0a..7d4ffcbe8 100644 --- a/pkg/cluster/connect.go +++ b/pkg/cluster/connect.go @@ -205,7 +205,10 @@ func (c *KubernetesClusterAPIImpl) createServiceAccountSecretIfNeeded(namespace return fmt.Errorf("%v: %w", cliOpts.Localizer.MustLocalize("cluster.kubernetes.serviceaccountsecret.error.createError"), err) } - cliOpts.Logger.Info(cliOpts.Localizer.MustLocalize("cluster.kubernetes.createSASecret.log.info.createSuccess", localize.NewEntry("Name", createdSecret.Name))) + cliOpts.Logger.Info(cliOpts.Localizer.MustLocalize("cluster.kubernetes.createSASecret.log.info.createSuccess", + localize.NewEntry("Name", createdSecret.Name), + localize.NewEntry("ClientID", serviceAcct.GetClientId()), + )) return nil } @@ -288,7 +291,7 @@ func (api *KubernetesClusterAPIImpl) watchForServiceStatus( case <-time.After(60 * time.Second): w.Stop() - return fmt.Errorf(localizer.MustLocalize("cluster.kubernetes.watchForKafkaStatus.error.timeout")) + return fmt.Errorf(localizer.MustLocalize("cluster.kubernetes.watchForResourceStatus.error.timeout", localize.NewEntry("Resource", serviceDetails.Type))) } } } diff --git a/pkg/localize/locales/en/cmd/cluster.en.toml b/pkg/localize/locales/en/cmd/cluster.en.toml index c68e78cd3..064aae0ac 100644 --- a/pkg/localize/locales/en/cmd/cluster.en.toml +++ b/pkg/localize/locales/en/cmd/cluster.en.toml @@ -231,7 +231,7 @@ one = ''' Connection Details: Service Type: {{.ServiceType}} -Service Name: {{.ServiceName}} +Service Name: {{.ServiceName}} Kubernetes Namespace: {{.Namespace}} Service Account Secret: {{.ServiceAccountSecretName}} ''' @@ -288,7 +288,17 @@ one = 'Access token already exist on the specified namespace' one = 'Token Secret "{{.Name}}" created successfully' [cluster.kubernetes.createSASecret.log.info.createSuccess] -one = 'Service Account Secret "{{.Name}}" created successfully' +one = ''' +Service Account Secret "{{.Name}}" created successfully + +Client ID: {{.ClientID}} + +Make a copy of the client ID to store in a safe place. Credentials won't appear again after closing the terminal. + +Execute the following command to grant access to the service account using rhoas cli: + + $ rhoas kafka acl grant-access --producer --consumer --service-account {{.ClientID}} --topic "*" --group "*" +''' [cluster.kubernetes.createTokenSecret.log.info.createFailed] one = 'Creation of the "{{.Name}}" secret failed:'