Skip to content

Commit

Permalink
Add capa agent and version to ocm client config
Browse files Browse the repository at this point in the history
Signed-off-by: serngawy <[email protected]>
  • Loading branch information
serngawy committed Jan 22, 2025
1 parent 71928f2 commit 570a3ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/rosa/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ import (

"sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/scope"
"sigs.k8s.io/cluster-api-provider-aws/v2/util/system"
"sigs.k8s.io/cluster-api-provider-aws/v2/version"
)

const (
ocmTokenKey = "ocmToken"
ocmAPIURLKey = "ocmApiUrl"
ocmClientIDKey = "ocmClientID"
ocmClientSecretKey = "ocmClientSecret"
capaAgentName = "CAPA"
)

// NewOCMClient creates a new OCM client.
Expand All @@ -35,6 +37,8 @@ func NewOCMClient(ctx context.Context, rosaScope *scope.ROSAControlPlaneScope) (

ocmConfig := ocmcfg.Config{
URL: url,
UserAgent: capaAgentName,
Version: version.Get().GitVersion,
}

if clientID != "" && clientSecret != "" {
Expand Down

0 comments on commit 570a3ca

Please sign in to comment.