Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD-725: Adds build & deployer controller #289

Merged
merged 1 commit into from Mar 28, 2024

Conversation

apoorvajagtap
Copy link
Contributor

@apoorvajagtap apoorvajagtap commented Feb 14, 2024

This refactors the current defaultsRoleBinding controller into different controllers, responsible for managing respective roleBindings:

  • imagePullerRoleBindingController -> system:image-pullers
  • builderRoleBindingController -> system:image-builders
  • deployerRoleBindingController -> system:deployers

Dependent on:

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2024
@apoorvajagtap apoorvajagtap changed the title Adds build & deployer controller [WIP] Adds build & deployer controller Feb 14, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 14, 2024
@apoorvajagtap apoorvajagtap marked this pull request as draft February 14, 2024 09:46
@apoorvajagtap apoorvajagtap changed the title [WIP] Adds build & deployer controller [BUILD-725] Adds build & deployer controller Feb 14, 2024
@apoorvajagtap apoorvajagtap changed the title [BUILD-725] Adds build & deployer controller BUILD-725: Adds build & deployer controller Feb 14, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2024

@apoorvajagtap: This pull request references BUILD-725 which is a valid jira issue.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 14, 2024
@apoorvajagtap apoorvajagtap marked this pull request as ready for review February 15, 2024 09:45
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 15, 2024
@openshift-ci openshift-ci bot requested a review from csrwng February 15, 2024 09:45
@apoorvajagtap
Copy link
Contributor Author

apoorvajagtap commented Feb 15, 2024

/assign @adambkaplan @sayan-biswas for review

@apoorvajagtap apoorvajagtap marked this pull request as draft February 15, 2024 13:43
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 15, 2024
Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

This is a start, but in its current form could lead to two controllers reconciling the same set of objects. This would lead to conflicts galore and undesired behavior.

For your next iteration, the current "combined" role binding logic needs to be divided so the "deployer" controller only reconciles for the deployer service account, and the "builder" controller only reconciles the builder service account.

pkg/cmd/controller/config.go Outdated Show resolved Hide resolved
pkg/cmd/controller/config.go Outdated Show resolved Hide resolved
pkg/cmd/controller/authorization.go Outdated Show resolved Hide resolved
pkg/cmd/controller/authorization.go Outdated Show resolved Hide resolved
@apoorvajagtap
Copy link
Contributor Author

/retest

@apoorvajagtap
Copy link
Contributor Author

@adambkaplan the tests fail due to timeout while waiting for respective SAs & rolebindings being provisioned:

  Feb 27 06:37:09.817: INFO: Waiting for ServiceAccount "default" to be provisioned...
  Feb 27 06:37:09.931: INFO: Waiting for ServiceAccount "deployer" to be provisioned...
  Feb 27 06:37:10.045: INFO: Waiting for ServiceAccount "builder" to be provisioned...
  Feb 27 06:37:10.162: INFO: Waiting for RoleBinding "system:image-pullers" to be provisioned...
  Feb 27 06:37:10.187: INFO: Waiting for RoleBinding "system:image-builders" to be provisioned...

Seems like the controllers aren't being started. I believe this should be resolved once openshift/cluster-openshift-controller-manager-operator#335 is merged.
I tried creating a cluster via clusterBot referencing the current and openshift/cluster-openshift-controller-manager-operator#335, and all the controllers start & create required roleBindings.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 27, 2024

@apoorvajagtap: This pull request references BUILD-725 which is a valid jira issue.

In response to this:

This refactors the current defaultsRoleBinding controller into different controllers, responsible for managing respective roleBindings:

  • defaultRoleBindingController -> system:image-pullers
  • builderRoleBindingController -> system:image-builders
  • deployerRoleBindingController -> system:deployers

Dependent on:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 27, 2024

@apoorvajagtap: This pull request references BUILD-725 which is a valid jira issue.

In response to this:

This refactors the current defaultsRoleBinding controller into different controllers, responsible for managing respective roleBindings:

  • defaultRoleBindingController -> system:image-pullers
  • builderRoleBindingController -> system:image-builders
  • deployerRoleBindingController -> system:deployers

Dependent on:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

I think we're almost over the finish line here!

@apoorvajagtap
Copy link
Contributor Author

/retest

2 similar comments
@apoorvajagtap
Copy link
Contributor Author

/retest

@apoorvajagtap
Copy link
Contributor Author

/retest

@apoorvajagtap
Copy link
Contributor Author

/test e2e-gcp-ovn-builds

2 similar comments
@apoorvajagtap
Copy link
Contributor Author

/test e2e-gcp-ovn-builds

@apoorvajagtap
Copy link
Contributor Author

/test e2e-gcp-ovn-builds

@apoorvajagtap
Copy link
Contributor Author

/retest

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/approve

@apoorvajagtap code looks great! Please squash commits, then I'll add LGTM

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2024
Copy link
Contributor

openshift-ci bot commented Mar 27, 2024

@apoorvajagtap: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 9db5df9 link false /test security

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2024
Copy link
Contributor

openshift-ci bot commented Mar 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, apoorvajagtap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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-merge-bot openshift-merge-bot bot merged commit b3c423f into openshift:master Mar 28, 2024
10 of 11 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-openshift-controller-manager-container-v4.16.0-202403280418.p0.gb3c423f.assembly.stream.el9 for distgit ose-openshift-controller-manager.
All builds following this will include this PR.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants