Skip to content

Move bus deployments to knative-eventing#359

Merged
knative-prow-robot merged 2 commits into
knative:masterfrom
scothis:bus-runtime-namespace
Aug 15, 2018
Merged

Move bus deployments to knative-eventing#359
knative-prow-robot merged 2 commits into
knative:masterfrom
scothis:bus-runtime-namespace

Conversation

@scothis
Copy link
Copy Markdown
Contributor

@scothis scothis commented Aug 15, 2018

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

Bus provisioner and dispatcher deployments are now created in the knative-eventing namespace instead of the Bus's namespace. ClusterBuses are not impacted as they already run in the native-eventing namespace. The deployment names will now include the namespace of the Bus.

/assign @n3wscott for lgtm
/assign @evankanderson for approval

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
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 15, 2018
Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

var dispatcherServiceErr, dispatcherDeplErr, provisionerDeplError error

// Sync Service derived from the Bus
dispatcherService, dispatcherServiceErr = c.syncBusDispatcherService(bus)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not just use := here instead of pre-declaring?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why pass dispatcherDeplErr here when you initialize it to nil on 315? (the same for provisionerDeplError).

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2018
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[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

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 15, 2018
@knative-prow-robot knative-prow-robot merged commit 320a40c into knative:master Aug 15, 2018
@scothis scothis deleted the bus-runtime-namespace branch September 12, 2018 00:35
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.

3 participants