Skip to content

Commit a217f77

Browse files
Extend details for kubelet re-configuration
- Changes needed for kubelet - Non-goals extended with mention about CSI and multiple clouds - Question about desired architecture for deploying "ccm" controller
1 parent 379b59d commit a217f77

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

enhancements/machine-api/out-of-tree-provider-support.md

+34-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ superseded-by:
3131

3232
## Open Questions
3333

34-
TBD
34+
1) Should we running `cloud-controller-manager` as:
35+
- static `Pod` managed from the `Node` filesystem.
36+
- `Deployment` backing up the `Pod`.
37+
- `ReplicaSet` to run a `Pod` on each master node.
3538

3639
## Summary
3740

@@ -50,7 +53,8 @@ Upstream is currently moving towards exclusion of in-tree cloud-provider code fr
5053
### Non-Goals
5154

5255
- Force immediate exclusion of in-tree support for currently used providers, as their out-of-tree counterparts are added.
53-
- Introduce other approaches to rollout IPI cluster with `kind` or `cluster-api`.
56+
- Add support for CSI and other out-of-tree implementations of cluster storage interfaces.
57+
- Add support for running multiple cloud configurations in a single cluster.
5458

5559
## Proposal
5660

@@ -87,20 +91,35 @@ The `external CCM` implementation will be hosted within openshift repository in
8791

8892
Preparation steps, common for all providers:
8993
- Add support for recognition of the `external` option in library-go: https://github.com/openshift/library-go/blob/master/pkg/operator/configobserver/cloudprovider/observe_cloudprovider.go#L154 which will disable config parsing and add `external-cloud-config` option in the `Infrastructure` resource, which will be only used for external providers.
90-
- Port the templates of `cloud-controller` from upstream repositories into proposed https://github.com/openshift/cluster-cloud-controller-manager-operator repository. Those templates will belong to newly created `openshift-cloud-controller` namespace.
94+
- Port the templates of `cloud-controller` from upstream repositories into proposed https://github.com/openshift/cluster-cloud-controller-manager-operator repository. Those templates will belong to newly created `openshift-cloud-controller` namespace and be managed with an operator.
9195

9296
Each provider implementation will need to do the following minimal set of actions in order to make out-of-tree implemetation work:
9397
- Add `external` flag to `kube-controller-manager` pod instead of the previously used provider. Remove the `cloud-config` option from the template.
94-
- Add `external` flag to `kubelet`.
95-
- Deploy a `cloud-controller` `DaemonSet` in the `openshift-cloud-controller` namespace.
98+
- Add `external` flag to `kubelet`. Remove the `cloud-config` option from the template.
99+
- Deploy a `cloud-controller` pod in the `openshift-cloud-controller` namespace.
96100

97101
## Design Details
98102

103+
### Kubelet
104+
105+
Openshift manages `kubelet` configuration with `machine-config-operator`. The actual `cloud-config` arguments are passed externally from the `Infrastructure` resource on https://github.com/openshift/machine-config-operator/blob/2a51e49b0835bbd3ac60baa685299e86777b064f/pkg/controller/template/render.go#L310-L357, where the support for `external` cloud provider should be added. For each platform with `external` configuration, the `cloud-config` flag should not be set.
106+
107+
### Kube-api-server
108+
109+
No changes for the current configuration are needed
110+
111+
### Kube-controller-manager
112+
113+
TBD
114+
99115
#### Upgrade/Downgrade strategy
100116

101117
Upstream [proposal](https://github.com/kubernetes/enhancements/blob/473d6a094f07e399079d1ce4698d6e52ddcc1567/keps/sig-cloud-provider/20190422-cloud-controller-manager-migration.md#motivation) describes main pinpoints for migration between in-tree and out-of-tree for HA clusters. They propose implementation for cross-namespace leadership delegation, which would help Openshift to preserve HA during upgrages.
102118

103-
In case the cluster does not require to be HA, then upgrading under CVO management, which will lead to two simultanious replicas of `cloud-controller`s running at the same time at some moment is not a problem.
119+
In case the cluster does not require to be HA, then upgrading under CVO management, which will lead to two simultanious replicas of `cloud-controllers` running at the same time at some moment is not a problem. Each provider, therefore supports multiple options to run the `cloud-controller`:
120+
121+
1) As a `DaemonSet`. This is the HA option, where the leader-election on the running pod ensuring a single replica is serving cluster at any point in time.
122+
2) As a `Pod`. For Openshift this option is not sufficient, so non-HA environment will run this pod under `Deployment` or as a static resource managed from the `Node` filesystem in the `openshift-cloud-controller` namespace.
104123

105124
#### Examples
106125

@@ -109,6 +128,12 @@ In case the cluster does not require to be HA, then upgrading under CVO manageme
109128
Main repository: https://github.com/kubernetes/cloud-provider-aws/
110129
Sample manifests: https://github.com/kubernetes/cloud-provider-aws/tree/master/manifests
111130

131+
To try external cloud-controller-manager, siply run:
132+
```bash
133+
oc apply -f https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/master/manifests/rbac.yaml
134+
oc apply -f https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/master/manifests/aws-cloud-controller-manager-daemonset.yaml
135+
```
136+
112137
##### Azure
113138

114139
Main repository: https://github.com/kubernetes-sigs/cloud-provider-azure
@@ -124,15 +149,12 @@ Sample manifests: https://github.com/kubernetes/cloud-provider-gcp/tree/master/d
124149
Main repository: https://github.com/kubernetes/cloud-provider-vsphere
125150
Sample manifests: https://github.com/kubernetes/cloud-provider-vsphere/tree/master/manifests/controller-manager
126151

127-
##### Demo
128-
129-
- Running vSphere `cloud-controller` out-of-tree: TBD
130-
131152
### Test Plan
132153

133-
- Each provider at the time of migration should have a working CI implemetation, which will assist in testing the provisioning with out-of-tree support enabled. This requeires vSphere CI to be up and running and upgrade support for other providers.
154+
- Each provider at the time of migration should have a working CI implemetation, which will assist in testing the provisioning with out-of-tree support enabled.
134155
- Ensure that transition between in-tree and out-of-tree will be handled by the `Infrastracture` `external-cloud-config` field being set.
135-
- TBD
156+
- Ensure in-tree and out-of-tree providers could co-exist in the cluster if this is supported.
157+
- Ensure that upgrade from a release running on in-tree provider only to the out-of-tree succeeds.
136158

137159
##### Removing a deprecated feature
138160

0 commit comments

Comments
 (0)