Skip to content

Commit

Permalink
Merge pull request #1614 from mnaser/fix/add-user-agent
Browse files Browse the repository at this point in the history
🌱 chore: use capo cluster agent for API requests
  • Loading branch information
k8s-ci-robot authored Aug 2, 2023
2 parents 9e06dc2 + 21e6323 commit 3c742d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/scope/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (

infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha7"
"sigs.k8s.io/cluster-api-provider-openstack/pkg/clients"
"sigs.k8s.io/cluster-api-provider-openstack/version"
)

const (
Expand Down Expand Up @@ -152,6 +153,10 @@ func NewProviderClient(cloud clientconfig.Cloud, caCert []byte, logger logr.Logg
return nil, nil, "", fmt.Errorf("create providerClient err: %v", err)
}

ua := gophercloud.UserAgent{}
ua.Prepend(fmt.Sprintf("cluster-api-provider-openstack/%s", version.Get().String()))
provider.UserAgent = ua

config := &tls.Config{
MinVersion: tls.VersionTLS12,
}
Expand Down

0 comments on commit 3c742d2

Please sign in to comment.