k3s/cmd/kube-apiserver
Kubernetes Submit Queue 22af024093 Merge pull request #49412 from bjhaid/etcd_healthz_endpoint
Automatic merge from submit-queue (batch tested with PRs 49989, 49806, 49649, 49412, 49512)

This adds an etcd health check endpoint to kube-apiserver

addressing https://github.com/kubernetes/kubernetes/issues/48215.

**What this PR does / why we need it**:
This ensures kube-apiserver `/healthz` endpoint fails whenever connectivity cannot be established to etcd, also ensures the etcd preflight checks works with unix sockets

**Which issue this PR fixes**: fixes #48215

**Special notes for your reviewer**:
This PR does not use the etcd client directly as the client object is wrapped behind the storage interface and not exposed directly for use, so I decided to reuse what's being done in the preflight. So this will only check fail for connectivity and not etcd auth related problems. I did not write tests for the endpoint because I couldn't find examples that I could follow for writing tests for healthz related endpoints, I'll be willing to write those tests if someone can point me at a relevant one.

**Release note**:
```release-note
Add etcd connectivity endpoint to healthz
```

@deads2k please help review, thanks!
2017-08-02 17:06:02 -07:00
..
app Merge pull request #49412 from bjhaid/etcd_healthz_endpoint 2017-08-02 17:06:02 -07:00
BUILD Convert go_binary linkstamp to x_defs 2017-06-08 14:59:55 -07:00
OWNERS kube-apiserver: add myself to OWNERS 2017-06-07 12:43:38 +02:00
apiserver.go wire in aggregation 2017-03-27 09:44:10 -04:00