File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import (
38
38
"sigs.k8s.io/controller-runtime/pkg/client"
39
39
40
40
bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
41
+ "sigs.k8s.io/cluster-api/controllers/remote"
41
42
controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
42
43
runtimecatalog "sigs.k8s.io/cluster-api/exp/runtime/catalog"
43
44
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
55
56
// scheme is a Kubernetes runtime scheme containing all the information about API types used by the test extension.
56
57
// NOTE: it is not mandatory to use scheme in custom RuntimeExtension, but working with typed API objects makes code
57
58
// easier to read and less error prone than using unstructured or working with raw json/yaml.
58
- scheme = runtime .NewScheme ()
59
+ scheme = runtime .NewScheme ()
60
+ controllerName = "cluster-api-test-extension-manager"
59
61
60
62
// Flags.
61
63
profilerAddress string
@@ -202,6 +204,7 @@ func main() {
202
204
setupLog .Error (err , "error getting config for the cluster" )
203
205
os .Exit (1 )
204
206
}
207
+ restConfig .UserAgent = remote .DefaultClusterAPIUserAgent (controllerName )
205
208
206
209
client , err := client .New (restConfig , client.Options {})
207
210
if err != nil {
You can’t perform that action at this time.
0 commit comments