-
Notifications
You must be signed in to change notification settings - Fork 630
Split the channel broker off from eventing core #2519
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../.git/HEAD |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../LICENSE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../third_party/VENDOR-LICENSE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../.git/refs/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| Copyright 2020 The Knative Authors | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package main | ||
|
|
||
| import ( | ||
| // Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters). | ||
| // _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||
|
|
||
| "knative.dev/pkg/injection/sharedmain" | ||
|
|
||
| "knative.dev/eventing/pkg/reconciler/broker" | ||
| "knative.dev/eventing/pkg/reconciler/configmappropagation" | ||
| "knative.dev/eventing/pkg/reconciler/namespace" | ||
| "knative.dev/eventing/pkg/reconciler/trigger" | ||
| ) | ||
|
|
||
| func main() { | ||
| sharedmain.Main("controller", | ||
| // Eventing | ||
| namespace.NewController, | ||
| broker.NewController, | ||
| trigger.NewController, | ||
|
|
||
| // Utility for sole-tenancy brokers. | ||
| configmappropagation.NewController, | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| brokers/channel-broker/200-channel-broker-binding.yaml | ||
|
mattmoor marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| brokers/channel-broker/roles/controller-clusterroles.yaml | ||
|
mattmoor marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| core/resources/configmappropagation.yaml | ||
|
mattmoor marked this conversation as resolved.
Outdated
|
||
| brokers/channel-broker/resources/configmappropagation.yaml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| brokers/channel-broker/deployments/controller.yaml | ||
|
mattmoor marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Copyright 2020 The Knative Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: eventing-channel-broker-controller | ||
| labels: | ||
| eventing.knative.dev/release: devel | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: eventing-controller | ||
| namespace: knative-eventing | ||
| roleRef: | ||
| kind: ClusterRole | ||
| name: knative-eventing-channel-broker-controller | ||
| apiGroup: rbac.authorization.k8s.io |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Copyright 2018 The Knative Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: broker-controller | ||
| namespace: knative-eventing | ||
| labels: | ||
| eventing.knative.dev/release: devel | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: broker-controller | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: broker-controller | ||
| eventing.knative.dev/release: devel | ||
| spec: | ||
| serviceAccountName: eventing-controller | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This controller should have a different service account with the permissions it needs rather than sharing with the core eventing controller. |
||
|
|
||
| containers: | ||
| - name: eventing-controller | ||
| terminationMessagePolicy: FallbackToLogsOnError | ||
| image: knative.dev/eventing/cmd/channel_broker | ||
|
|
||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 100Mi | ||
|
|
||
| env: | ||
| - name: SYSTEM_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| - name: CONFIG_LOGGING_NAME | ||
| value: config-logging | ||
| - name: CONFIG_OBSERVABILITY_NAME | ||
| value: config-observability | ||
| - name: METRICS_DOMAIN | ||
| value: knative.dev/eventing | ||
| # Broker | ||
| - name: BROKER_INGRESS_IMAGE | ||
| value: knative.dev/eventing/cmd/broker/ingress | ||
| - name: BROKER_INGRESS_SERVICE_ACCOUNT | ||
| value: eventing-broker-ingress | ||
| - name: BROKER_FILTER_IMAGE | ||
| value: knative.dev/eventing/cmd/broker/filter | ||
| - name: BROKER_FILTER_SERVICE_ACCOUNT | ||
| value: eventing-broker-filter | ||
| - name: BROKER_IMAGE_PULL_SECRET_NAME | ||
| value: | ||
|
|
||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
|
|
||
| ports: | ||
| - name: metrics | ||
| containerPort: 9090 | ||
| - name: profiling | ||
| containerPort: 8008 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Copyright 2020 The Knative Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: knative-eventing-channel-broker-controller | ||
| labels: | ||
| eventing.knative.dev/release: devel | ||
| rules: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should include all permissions the broker controller needs. |
||
| # Configs resources and status we care about. | ||
| - apiGroups: | ||
| - "configs.internal.knative.dev" | ||
| resources: | ||
| - "configmappropagations" | ||
| - "configmappropagations/status" | ||
| verbs: | ||
| - "get" | ||
| - "list" | ||
| - "create" | ||
| - "update" | ||
| - "delete" | ||
| - "patch" | ||
| - "watch" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These controllers have accompanying webhooks that still live in the eventing-webhook deployment. Was that missed or intentional?