k3s/cmd
Kubernetes Submit Queue f5d5d18b2c
Merge pull request #57340 from jmcmeek/jmcmeek_57044
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>.

Fix garbage collector when leader-elect=false

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

In a 1.8.x master with --leader-elect=false, the garbage collector controller
does not work.

When deleting a deployment with v1meta.DeletePropagationForeground, the deployment
had its deletionTimestamp set and a foreground Deletion finalizer was added,
but the deployment, rs and pod were not deleted.

This is an issue with how the garbage collector graph_builder behaves when the
stopCh=nil.  This PR creates a dummy stop channel for the garbage collector controller (and other
controllers started by the controller-manager) so that they can work more like they do when
when the controller-manager is configured with --leader-elect=true.

**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 #57044

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix garbage collection when the controller-manager uses --leader-elect=false
```
2018-01-02 11:45:25 -08:00
..
clicheck Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
cloud-controller-manager Switch go binaries from (hacky) static to pure Go 2017-12-23 13:13:09 -08: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 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
genman Autogenerate BUILD files 2017-12-23 13:12:11 -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 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
importverifier Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
kube-apiserver Switch go binaries from (hacky) static to pure Go 2017-12-23 13:13:09 -08:00
kube-controller-manager Merge pull request #57340 from jmcmeek/jmcmeek_57044 2018-01-02 11:45:25 -08:00
kube-proxy Switch go binaries from (hacky) static to pure Go 2017-12-23 13:13:09 -08:00
kubeadm Regenerate all generated code 2018-01-02 00:21:07 -08:00
kubectl Switch go binaries from (hacky) static to pure Go 2017-12-23 13:13:09 -08:00
kubelet Autogenerate BUILD files 2017-12-23 13:12:11 -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 Seperate loop and plugin control 2017-12-18 10:58:45 -08:00
OWNERS Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00