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
@@ -196,6 +198,7 @@ func main() {
196
198
setupLog .Error (err , "error getting config for the cluster" )
197
199
os .Exit (1 )
198
200
}
201
+ restConfig .UserAgent = remote .DefaultClusterAPIUserAgent (controllerName )
199
202
200
203
client , err := client .New (restConfig , client.Options {})
201
204
if err != nil {
You can’t perform that action at this time.
0 commit comments