knative / build

A Kubernetes-native Build resource.
Apache License 2.0
575 stars 159 forks source link

Move Build onto the injection-gen based controller infrastructure. #617

Closed mattmoor closed 5 years ago

mattmoor commented 5 years ago

I've broken this into finer grained commits as a sort guide for migration. I can try to take a crack at doing something along these lines for tekton as well, but the goal of the broader refactoring was to effectively eliminate boilerplate outside of pkg/reconciler/foo for writing controllers, and keep our various controllers from drifting apart as we add features (e.g. this gives Build various metrics integrations including stackdriver that I believe it lacked previously).

This also enables us to pretty trivially consolidate controllers, or split them apart by simply changing what goes into the main binary.

/hold

cc @bobcatfish @vdemeester @n3wscott

vdemeester commented 5 years ago

@mattmoor nice ! I'll look into that for tekton :angel:

knative-metrics-robot commented 5 years ago

The following is the coverage report on pkg/. Say /test pull-knative-build-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/build/build.go 69.8% 65.6% -4.2
pkg/reconciler/build/controller.go Do not exist 100.0%
mattmoor commented 5 years ago

@vdemeester let me or @n3wscott know if you run into any trouble :)

knative-prow-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ImJasonH, mattmoor

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: - ~~[OWNERS](https://github.com/knative/build/blob/master/OWNERS)~~ [ImJasonH,mattmoor] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mattmoor commented 5 years ago

/hold cancel