Skip to content
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
7 changes: 5 additions & 2 deletions pkg/cluster/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)))
}
}
}
14 changes: 12 additions & 2 deletions pkg/localize/locales/en/cmd/cluster.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ one = '''
Connection Details:

Service Type: {{.ServiceType}}
Service Name: {{.ServiceName}}
Service Name: {{.ServiceName}}
Kubernetes Namespace: {{.Namespace}}
Service Account Secret: {{.ServiceAccountSecretName}}
'''
Expand Down Expand Up @@ -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:'
Expand Down