Skip to content

Initial AWS CCM deployment using upstream image#15

Merged
openshift-merge-robot merged 2 commits intoopenshift:masterfrom
Danil-Grigorev:include-aws
Apr 19, 2021
Merged

Initial AWS CCM deployment using upstream image#15
openshift-merge-robot merged 2 commits intoopenshift:masterfrom
Danil-Grigorev:include-aws

Conversation

@Danil-Grigorev
Copy link
Copy Markdown

@Danil-Grigorev Danil-Grigorev commented Feb 11, 2021

Requirements to work:

Needs to additionally be merged:

@Danil-Grigorev
Copy link
Copy Markdown
Author

/hold We need to merge prereq PRs first.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 11, 2021
@Danil-Grigorev
Copy link
Copy Markdown
Author

/retest

@Danil-Grigorev
Copy link
Copy Markdown
Author

Danil-Grigorev commented Mar 22, 2021

/hold cancel

This implementation works in my manual testing. Unit tests are already in place, the PR is ready for review. (#17)

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 22, 2021
Comment on lines -11 to -61
---
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sure. As I mentioned elsewhere I think we could potentially eliminate these entirely later.

Copy link
Copy Markdown
Contributor

@Fedosin Fedosin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Danil-Grigorev
Copy link
Copy Markdown
Author

@Danil-Grigorev Danil-Grigorev requested a review from Fedosin March 23, 2021 16:58
@Danil-Grigorev Danil-Grigorev mentioned this pull request Mar 25, 2021
1 task
Copy link
Copy Markdown
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread pkg/cloud/aws.go
obj client.Object
asset string
}{
{&appsv1.Deployment{}, "aws/assets/deployment.yaml"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the idea here that more resources will be added later?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it is build with intention that it might need to deploy some SA or another Deployment potentially in the future.

Comment thread pkg/cloud/aws.go Outdated
Copy link
Copy Markdown
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Danil!
/approve

@openshift-ci-robot
Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 15, 2021
@elmiko
Copy link
Copy Markdown
Contributor

elmiko commented Apr 15, 2021

/hold
didn't realize it added both labels. just putting a hold so others can review

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 15, 2021
@Danil-Grigorev
Copy link
Copy Markdown
Author

/lgtm cancel

We need to fix the CI to prevent double label addition @Fedosin
Let's wait for tests to pass again.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2021
@Danil-Grigorev
Copy link
Copy Markdown
Author

/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 15, 2021
@JoelSpeed
Copy link
Copy Markdown
Contributor

Can we make this look more similar to the openstack one? Keeping it in its own package in case it expands later?

@Danil-Grigorev
Copy link
Copy Markdown
Author

/retest

@elmiko
Copy link
Copy Markdown
Contributor

elmiko commented Apr 15, 2021

Can we make this look more similar to the openstack one? Keeping it in its own package in case it expands later?

+1, i think that makes good sense

@Danil-Grigorev
Copy link
Copy Markdown
Author

@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

@JoelSpeed
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2021
@openshift-merge-robot openshift-merge-robot merged commit 22a11cf into openshift:master Apr 19, 2021
@Danil-Grigorev Danil-Grigorev deleted the include-aws branch April 20, 2021 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants