Unverified Commit 71b40cbc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60943 from jennybuckley/webhook-https-url

Automatic merge from submit-queue (batch tested with PRs 60906, 60943). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Make admission webhooks honor scheme part of url **What this PR does / why we need it**: Bug fix, allow webhooks to use the scheme provided in clientConfig, instead of defaulting to http. (more in issue) **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #60942 ```release-note Bug fix, allow webhooks to use the scheme provided in clientConfig, instead of defaulting to http. ``` /kind bug /sig api-machinery
parents a5a81da4 7d5696eb
...@@ -168,7 +168,7 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error ...@@ -168,7 +168,7 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error
} }
cfg := rest.CopyConfig(restConfig) cfg := rest.CopyConfig(restConfig)
cfg.Host = u.Host cfg.Host = u.Scheme + "://" + u.Host
cfg.APIPath = u.Path cfg.APIPath = u.Path
return complete(cfg) return complete(cfg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment