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

NewServiceSyncController #305

Merged

Conversation

benjaminapetersen
Copy link
Contributor

Split SyncService() func into separate NewServiceSyncController() from main operator control loop.

Rather than one mega controller doing all the things, we should have many smaller controllers doing specific things. The first step will be to split off by resources as this is fairly simple. However, some resources, such as the Deployment, may be split into several if it makes sense.

This controller does not make use of monis.app/go/openshift/operator boilerplate, thus it implements all of the following:

func sync() {}
func Run() {}
func runWorker() {}
func processNextWorkItem() {}
func newEventHandler() {}

which, for the most part, is pretty generic.

@jhadvig FYI, this may be helpful to look at for the CRDs control loop.

@benjaminapetersen benjaminapetersen changed the title Split SyncService() func into separate NewServiceSyncController() [WIP] Split SyncService() func into separate NewServiceSyncController() Oct 2, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 2, 2019
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 2, 2019
return nil
}

// if err := SyncService(); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: here is where the current service sync logic will be wired in once removed from the original sync loop.

@@ -68,6 +68,9 @@ func (co *consoleOperator) sync_v400(updatedOperatorConfig *operatorv1.Console,
return rtErr
}

// TODO: remove this from this sync loop and treat it as its own sync loop.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracting this next.

@benjaminapetersen benjaminapetersen changed the title [WIP] Split SyncService() func into separate NewServiceSyncController() Split SyncService func into separate NewServiceSyncController Oct 15, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 15, 2019
@benjaminapetersen
Copy link
Contributor Author

/retest

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Couple of small comments, otherwise looks great ! 👍

pkg/console/starter/starter.go Show resolved Hide resolved
pkg/console/controllers/service/controller.go Show resolved Hide resolved
pkg/console/controllers/service/controller.go Outdated Show resolved Hide resolved
pkg/console/controllers/service/controller.go Outdated Show resolved Hide resolved
pkg/console/controllers/service/controller.go Show resolved Hide resolved
pkg/console/operator/sync_v400.go Outdated Show resolved Hide resolved
pkg/console/operator/sync_v400.go Outdated Show resolved Hide resolved
pkg/console/operator/sync_v400.go Outdated Show resolved Hide resolved
pkg/console/starter/starter.go Outdated Show resolved Hide resolved
@benjaminapetersen
Copy link
Contributor Author

@jhadvig most items addressed & updated, 2 with comments. Thx!

@benjaminapetersen
Copy link
Contributor Author

/retest

level=fatal msg="failed to initialize the cluster: Some cluster operators are still updating: machine-api, monitoring"

@benjaminapetersen
Copy link
Contributor Author

/retest

level=fatal msg="failed to initialize the cluster: Working towards 0.0.1-2019-10-17-184159: 96% complete"

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Two small nist otherwise its ready for merge :) 👍

pkg/console/starter/starter.go Show resolved Hide resolved
pkg/console/controllers/service/controller.go Outdated Show resolved Hide resolved
pkg/console/controllers/service/controller.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 18, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 21, 2019
@benjaminapetersen benjaminapetersen changed the title Split SyncService func into separate NewServiceSyncController NewServiceSyncController Oct 21, 2019
@benjaminapetersen
Copy link
Contributor Author

rebased.
@jhadvig

@jhadvig
Copy link
Member

jhadvig commented Oct 22, 2019

/retest

Copy link
Member

@jhadvig jhadvig 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 22, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benjaminapetersen, jhadvig

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@benjaminapetersen
Copy link
Contributor Author

/retest

level=fatal msg="Terraform destroy: failed to destroy using Terraform"

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2019

@benjaminapetersen: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-upgrade 9035114 link /test e2e-aws-upgrade

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@benjaminapetersen benjaminapetersen merged commit 042b4f8 into openshift:master Oct 22, 2019
@benjaminapetersen benjaminapetersen deleted the controllers/service branch October 22, 2019 20:41
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants