Skip to content

Commit

Permalink
Merge pull request #1736 from bskiba/fix-registration
Browse files Browse the repository at this point in the history
Fix nil reference in admission controller registration.
  • Loading branch information
k8s-ci-robot authored Feb 27, 2019
2 parents bb2bc8c + 4519d59 commit 567eac3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vertical-pod-autoscaler/pkg/admission-controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 567eac3

Please sign in to comment.