• Kubernetes Submit Queue's avatar
    Merge pull request #34273 from wlan0/master · 48793a48
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 39093, 34273)
    
    start breaking up controller manager into two pieces
    
    This PR addresses: https://github.com/kubernetes/features/issues/88
    
    This commit starts breaking the controller manager into two pieces, namely,
    1. cloudprovider dependent piece
    2. coudprovider agnostic piece
    
    the controller manager has the following control loops -
    - nodeController
    - volumeController
    - routeController
    - serviceController
    - replicationController
    - endpointController
    - resourceQuotaController
    - namespaceController
    - deploymentController 
      etc..
    
    among the above controller loops,
    - nodeController
    - volumeController
    - routeController
    - serviceController
    
    are cloud provider dependent. As kubernetes has evolved tremendously, it has become difficult
    for different cloudproviders (currently 8), to make changes and iterate quickly. Moreover, the
    cloudproviders are constrained by the kubernetes build/release lifecycle. This commit is the first
    step in moving towards a kubernetes code base where cloud providers specific code will move out of
    the core repository, and will be maintained by the cloud providers themselves.
    
    I have added a new cloud provider called "external", which signals the controller-manager that
    cloud provider specific loops are being run by another controller. I have added these changes in such
    a way that the existing cloud providers are not affected. This change is completely backwards compatible, and does not require any changes to the way kubernetes is run today.
    
    Finally, along with the controller-manager, the kubelet also has cloud-provider specific code, and that will be addressed in a different commit/issue.
    
    @alena1108 @ibuildthecloud @thockin @dchen1107 
    
    **Special notes for your reviewer**:
    
    @thockin - Im making this **WIP** PR to ensure that I don't stray too far from everyone's view of how we should make this change. As you can see, only one controller, namely `nodecontroller` can be disabled with the `--cloudprovider=external` flag at the moment. I'm working on cleaning up the `rancher-controller-manger` that I wrote to test this.
    
    Secondly, I'd like to use this PR to address cloudprovider specific code in kubelet and api-server.
    
    **Kubelet**
    Kubelet uses provider specific code for node registration and for checking node-status. I thought of two ways to divide the kubelet: 
    - We could start a cloud provider specific kubelet on each host as a part of kubernetes, and this cloud-specific-kubelet does node registration and node-status checks. 
    - Create a kubelet plugin for each provider, which will be started by kubelet as a long running service. This plugin can be packaged as a binary.
    
    I'm leaning towards the first option. That way, kubelet does not have to manage another process, and we can offload the process management of the cloud-provider-specific-kubelet to something like systemd. 
    
    @dchen1107 @thockin what do you think?
    
    **Kube-apiserver**
    
    Kube-apiserver uses provider specific code for distributing ssh keys to all the nodes of a cluster. Do you have any suggestions about how to address this? 
    
    **Release note**:
    
    ``` release-note
    ```
    48793a48
Name
Last commit
Last update
..
certificates Loading commit data...
cloud Loading commit data...
cronjob Loading commit data...
daemon Loading commit data...
deployment Loading commit data...
disruption Loading commit data...
endpoint Loading commit data...
garbagecollector Loading commit data...
informers Loading commit data...
job Loading commit data...
namespace Loading commit data...
node Loading commit data...
petset Loading commit data...
podautoscaler Loading commit data...
podgc Loading commit data...
replicaset Loading commit data...
replication Loading commit data...
resourcequota Loading commit data...
route Loading commit data...
scheduledjob Loading commit data...
service Loading commit data...
serviceaccount Loading commit data...
volume Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
client_builder.go Loading commit data...
controller_ref_manager.go Loading commit data...
controller_utils.go Loading commit data...
controller_utils_test.go Loading commit data...
doc.go Loading commit data...
lookup_cache.go Loading commit data...