Merge pull request #65878 from Cynerva/gkk/fix-worker-sans

Automatic merge from submit-queue (batch tested with PRs 65839, 65878). 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>.

juju: Fix kubernetes-worker certificate SANs on AWS

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

This fixes a problem with kubernetes-worker that prevents `kubectl logs` and `kubectl exec` from working when deployed on AWS.

Specifically, this adds hostname back into the certificate request's SANs so that kube-apiserver can talk to kubelet properly.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/606

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-07-05 15:47:59 -07:00 committed by GitHub
commit 9d11a47793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -361,7 +361,7 @@ def send_data(tls, kube_control):
sans = [
hookenv.unit_public_ip(),
ingress_ip,
get_node_name()
gethostname()
]
# Create a path safe name by removing path characters from the unit name.