Add UserAgent to client-go client config

This commit is contained in:
Sam Stoelinga 2022-07-21 16:41:23 -07:00
parent 17cd6b7c8b
commit c4cb2ee824

View File

@ -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)