Initial AWS CCM deployment using upstream image#15
Initial AWS CCM deployment using upstream image#15openshift-merge-robot merged 2 commits intoopenshift:masterfrom
Conversation
|
/hold We need to merge prereq PRs first. |
|
/retest |
6fb4441 to
e62c57a
Compare
e62c57a to
a6746e5
Compare
|
/hold cancel This implementation works in my manual testing. Unit tests are already in place, the PR is ready for review. (#17) |
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: cloud-controller-manager | ||
| namespace: kube-system | ||
| annotations: | ||
| include.release.openshift.io/self-managed-high-availability: "true" | ||
| include.release.openshift.io/single-node-developer: "true" | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - serviceaccounts | ||
| resourceNames: | ||
| - node-controller | ||
| - service-controller | ||
| verbs: | ||
| - get | ||
|
|
||
| # This grants CCMs permission to list and read all secrets in kube-system. | ||
| # This is required by client builder to fetch the ServiceAccount token | ||
| # secret. Ideally we would restrict this to the token secrets of specific | ||
| # ServiceAccounts. | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - secrets | ||
| verbs: | ||
| - list | ||
| - get | ||
| - watch | ||
|
|
||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: cloud-controller-manager | ||
| namespace: kube-system | ||
| annotations: | ||
| include.release.openshift.io/self-managed-high-availability: "true" | ||
| include.release.openshift.io/single-node-developer: "true" | ||
| roleRef: | ||
| kind: Role | ||
| name: cloud-controller-manager | ||
| apiGroup: rbac.authorization.k8s.io | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| namespace: openshift-cloud-controller-manager | ||
| name: cloud-controller-manager | ||
|
|
There was a problem hiding this comment.
AWS covers these RBAC changes with upaded cluster role here. I consider removing this for now, as for example Azure and vSphere both are using same clusterRole, which will work for OpenStack too. We will investigate and possible reduce the scope of it later.
There was a problem hiding this comment.
Ok, sure. As I mentioned elsewhere I think we could potentially eliminate these entirely later.
Fedosin
left a comment
There was a problem hiding this comment.
What about adding unit tests similar to what we have with OpenStack: https://github.com/openshift/cluster-cloud-controller-manager-operator/blob/master/pkg/cloud/openstack/openstack_test.go
|
@Fedosin It is already implemented and covered in https://github.com/openshift/cluster-cloud-controller-manager-operator/blob/master/controllers/clusteroperator_controller_test.go#L271-L336 |
elmiko
left a comment
There was a problem hiding this comment.
the code mostly makes sense, i have a few questions inline. also, is the main goal here for the code to dynamically load these manifests at run time?
| obj client.Object | ||
| asset string | ||
| }{ | ||
| {&appsv1.Deployment{}, "aws/assets/deployment.yaml"}, |
There was a problem hiding this comment.
is the idea here that more resources will be added later?
There was a problem hiding this comment.
Correct, it is build with intention that it might need to deploy some SA or another Deployment potentially in the future.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elmiko The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/lgtm cancel We need to fix the CI to prevent double label addition @Fedosin |
|
/hold cancel |
|
Can we make this look more similar to the openstack one? Keeping it in its own package in case it expands later? |
|
/retest |
+1, i think that makes good sense |
|
@JoelSpeed OpenStack manifests are located incorrectly. They should belong to higher level, so cloud provider switch case selection won't have to import N packages per provider just to select correct collection of manifests: see https://github.com/openshift/cluster-cloud-controller-manager-operator/blob/master/controllers/clusteroperator_controller.go#L25-L26 |
c56249f to
7d395f4
Compare
|
/lgtm |
Requirements to work:
Needs to additionally be merged: