Merge pull request #56828 from oracle/for/upstream/master/ccm-lock-id

Automatic merge from submit-queue (batch tested with PRs 56828, 55184, 56849, 57081, 56654). 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 hostname for CCM resource lock id

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

Uses the hostname for the resource lock id without the `-external-cloud-controller` which follows how the kube-scheduler and KCM select their ID. This is useful for tools that use the id to fetch logs from the leader among other things. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @wlan0 @luxas
This commit is contained in:
Kubernetes Submit Queue 2017-12-16 17:45:38 -08:00 committed by GitHub
commit 3e2de4e427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ func Run(s *options.CloudControllerManagerServer) error {
"cloud-controller-manager", "cloud-controller-manager",
leaderElectionClient.CoreV1(), leaderElectionClient.CoreV1(),
resourcelock.ResourceLockConfig{ resourcelock.ResourceLockConfig{
Identity: id + "-external-cloud-controller", Identity: id,
EventRecorder: recorder, EventRecorder: recorder,
}) })
if err != nil { if err != nil {