Move bus deployments to knative-eventing#359
Conversation
Buses can create dispatcher and provision deployments. Previously, these deployments were created in the same namespace as the Bus resource, which required RBAC rules to be configured to enable the deployments to read and update Bus, Channel and Subscription resources. By moving these deployments into the knative-eventing system namespace, we can use a pre-determined service account and RBAC configuration. Since the bus-controller no longer needs to create service accounts and role bindings, the controller can run with reduced privillage (follow knative#207 for that change). Fixes knative#349
| var dispatcherServiceErr, dispatcherDeplErr, provisionerDeplError error | ||
|
|
||
| // Sync Service derived from the Bus | ||
| dispatcherService, dispatcherServiceErr = c.syncBusDispatcherService(bus) |
There was a problem hiding this comment.
Why not just use := here instead of pre-declaring?
There was a problem hiding this comment.
This is existing code that I didn't want to conflate into this PR. I agree it's odd and needs to be cleaned up. The multiple calls to updateStatus are particularly smelly. Will open an issue.
| if dispatcherServiceErr != nil { | ||
| _ = c.updateBusStatus(bus, | ||
| dispatcherService, dispatcherServiceErr, | ||
| dispatcherDeployment, dispatcherDeplErr, |
There was a problem hiding this comment.
Why pass dispatcherDeplErr here when you initialize it to nil on 315? (the same for provisionerDeplError).
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, scothis 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 |
Buses can create dispatcher and provision deployments. Previously, these
deployments were created in the same namespace as the Bus resource,
which required RBAC rules to be configured to enable the deployments to
read and update Bus, Channel and Subscription resources.
By moving these deployments into the knative-eventing system namespace,
we can use a pre-determined service account and RBAC configuration.
Since the bus-controller no longer needs to create service accounts and
role bindings, the controller can run with reduced privillage (follow
#207 for that change).
Fixes #349
Release Note
/assign @n3wscott for lgtm
/assign @evankanderson for approval