diff --git a/vertical-pod-autoscaler/pkg/admission-controller/config.go b/vertical-pod-autoscaler/pkg/admission-controller/config.go index 049b069f213..b17297c7e33 100644 --- a/vertical-pod-autoscaler/pkg/admission-controller/config.go +++ b/vertical-pod-autoscaler/pkg/admission-controller/config.go @@ -67,8 +67,10 @@ func selfRegistration(clientset *kubernetes.Clientset, caCert []byte, namespace } RegisterClientConfig := v1beta1.WebhookClientConfig{} if !registerByURL { - RegisterClientConfig.Service.Name = *namespace - RegisterClientConfig.Service.Name = "vpa-webhook" + RegisterClientConfig.Service = &v1beta1.ServiceReference{ + Namespace: *namespace, + Name: "vpa-webhook", + } } else { RegisterClientConfig.URL = &url }