• Kubernetes Submit Queue's avatar
    Merge pull request #49412 from bjhaid/etcd_healthz_endpoint · 22af0240
    Kubernetes Submit Queue authored
    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!
    22af0240
Name
Last commit
Last update
..
app Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
apiserver.go Loading commit data...