From c4cb2ee8243734cf2afd5ecb202551a05e631250 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Thu, 21 Jul 2022 16:41:23 -0700 Subject: [PATCH] Add UserAgent to client-go client config --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 5709512..261556c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -54,10 +54,11 @@ func init() { // use the current context in kubeconfig config, err := clientcmd.BuildConfigFromFlags("", kubeconfig) - config.WarningHandler = rest.NoWarnings{} if err != nil { panic(err.Error()) } + config.UserAgent = "pspmigrator" + config.WarningHandler = rest.NoWarnings{} // create the clientset clientset, err = kubernetes.NewForConfig(config)