k3s/cmd
Kubernetes Submit Queue ac495f169b
Merge pull request #58644 from yguo0905/webhooks
Automatic merge from submit-queue. 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>.

Use SSH tunnel for webhook communication iff the webhook is deployed as a service

**What this PR does / why we need it**:

We are getting the following error when the apiserver connects the webhook on localhost (configured via URL). We should only use the SSL tunnel for the connections to nodes when the webhooks are running as services.

```
I0119 17:41:18.678436       1 ssh.go:400] [4cdf44753cc3705d: localhost:10258] Dialing...
W0119 17:41:18.678483       1 ssh.go:424] SSH tunnel not found for address "localhost", picking random node
I0119 17:41:18.679810       1 ssh.go:402] [4cdf44753cc3705d: localhost:10258] Dialed in 1.398691ms.
W0119 17:41:18.679928       1 admission.go:256] Failed calling webhook, failing closed xxx: failed calling admission webhook "xxx": Post xxx: ssh: rejected: connect failed (Connection refused)
I0119 17:41:18.680346       1 wrap.go:42] POST /api/v1/namespaces/kube-system/pods: (5.725588ms) 500
```

**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 # https://github.com/kubernetes/kubernetes/issues/58779

**Special notes for your reviewer**:

**Release note**:

```release-note
kube-apiserver is changed to use SSH tunnels for webhook iff the webhook is not directly routable from apiserver's network environment.
```

/assign @lavalamp @caesarxuchao @cheftako
2018-01-26 15:58:27 -08:00
..
clicheck Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
cloud-controller-manager uniquify resource lock identities 2018-01-18 11:31:43 -05:00
controller-manager/app/options Seperate loop and plugin control 2017-12-18 10:58:45 -08:00
gendocs Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
genkubedocs Merge pull request #53631 from dixudx/enforce_cobra_required_flags 2018-01-18 02:00:27 -08:00
genman Fix scheduler refs in BUILD files. 2018-01-05 15:05:01 -08:00
genswaggertypedocs Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
genutils Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
genyaml Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
gke-certificates-controller Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
hyperkube switch hyper to cobra 2018-01-24 11:02:19 -05:00
importverifier Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
kube-apiserver Merge pull request #58644 from yguo0905/webhooks 2018-01-26 15:58:27 -08:00
kube-controller-manager Merge pull request #58408 from deads2k/hyperkube-01-fix 2018-01-26 08:23:01 -08:00
kube-proxy Merge pull request #58378 from chentao1596/delete-redundant-symbols 2018-01-25 17:09:34 -08:00
kube-scheduler Merge pull request #58408 from deads2k/hyperkube-01-fix 2018-01-26 08:23:01 -08:00
kubeadm Adds breadcrumb to crictl warning 2018-01-26 13:06:12 -05:00
kubectl switch hyper to cobra 2018-01-24 11:02:19 -05:00
kubelet Merge pull request #58760 from mtaufen/kc-remove-kubeletconfigfile-gate 2018-01-26 14:35:25 -08:00
kubemark Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
linkcheck Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
BUILD Fix scheduler refs in BUILD files. 2018-01-05 15:05:01 -08:00
OWNERS