
---
# eventing-core.yaml
# 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: v1
kind: Namespace
metadata:
  name: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# 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: v1
kind: ServiceAccount
metadata:
  name: eventing-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-controller
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-controller-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: addressable-resolver
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-controller-source-observer
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: source-observer
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-controller-sources-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-sources-controller
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-controller-manipulator
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: channelable-manipulator
  apiGroup: rbac.authorization.k8s.io

---
# 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: v1
kind: ServiceAccount
metadata:
  name: pingsource-jobrunner
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: pingsource-jobrunner
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: pingsource-jobrunner
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-jobrunner
  apiGroup: rbac.authorization.k8s.io

---
# 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: v1
kind: ServiceAccount
metadata:
  name: eventing-webhook
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-webhook
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-webhook
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-webhook
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-webhook-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-webhook
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: addressable-resolver
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: eventing-webhook-podspecable-binding
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-webhook
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: podspecable-binding
  apiGroup: rbac.authorization.k8s.io

---
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-br-default-channel
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
data:
  channelTemplateSpec: |
    apiVersion: messaging.knative.dev/v1alpha1
    kind: InMemoryChannel

---
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-br-defaults
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
data:
  # Configuration for defaulting channels that do not specify CRD implementations.
  default-br-config: |
    clusterDefault:
      brokerClass: ChannelBasedBroker
      apiVersion: v1
      kind: ConfigMap
      name: config-br-default-channel
      namespace: knative-eventing

---
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: default-ch-webhook
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
data:
  # Configuration for defaulting channels that do not specify CRD implementations.
  default-ch-config: |
    clusterDefault:
      apiVersion: messaging.knative.dev/v1beta1
      kind: InMemoryChannel
    namespaceDefaults:
      some-namespace:
        apiVersion: messaging.knative.dev/v1beta1
        kind: InMemoryChannel

---
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-leader-election
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
data:
  # An inactive but valid configuration follows; see example.
  resourceLock: "leases"
  leaseDuration: "15s"
  renewDeadline: "10s"
  retryPeriod: "2s"
  _example: |
    ################################
    #                              #
    #    EXAMPLE CONFIGURATION     #
    #                              #
    ################################

    # This block is not actually functional configuration,
    # but serves to illustrate the available configuration
    # options and document them in a way that is accessible
    # to users that `kubectl edit` this config map.
    #
    # These sample configuration options may be copied out of
    # this example block and unindented to be in the data block
    # to actually change the configuration.

    # resourceLock controls which API resource is used as the basis for the
    # leader election lock. Valid values are:
    #
    # - leases -> use the coordination API
    # - configmaps -> use configmaps
    # - endpoints -> use endpoints
    resourceLock: "leases"

    # leaseDuration is how long non-leaders will wait to try to acquire the
    # lock; 15 seconds is the value used by core kubernetes controllers.
    leaseDuration: "15s"
    # renewDeadline is how long a leader will try to renew the lease before
    # giving up; 10 seconds is the value used by core kubernetes controllers.
    renewDeadline: "10s"
    # retryPeriod is how long the leader election client waits between tries of
    # actions; 2 seconds is the value used by core kuberntes controllers.
    retryPeriod: "2s"
    # enabledComponents is a comma-delimited list of component names for which
    # leader election is enabled. Valid values are:
    #
    # - controller
    # - broker-controller
    # - inmemorychannel-dispatcher
    # - inmemorychannel-controller
    enabledComponents: "controller,broker-controller,inmemorychannel-dispatcher,inmemorychannel-controller"

---
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-logging
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/config-propagation: original
    knative.dev/config-category: eventing
data:
  # Common configuration for all Knative codebase
  zap-logger-config: |
    {
      "level": "info",
      "development": false,
      "outputPaths": ["stdout"],
      "errorOutputPaths": ["stderr"],
      "encoding": "json",
      "encoderConfig": {
        "timeKey": "ts",
        "levelKey": "level",
        "nameKey": "logger",
        "callerKey": "caller",
        "messageKey": "msg",
        "stacktraceKey": "stacktrace",
        "lineEnding": "",
        "levelEncoder": "",
        "timeEncoder": "iso8601",
        "durationEncoder": "",
        "callerEncoder": ""
      }
    }
  # Log level overrides
  # For all components changes are be picked up immediately.
  loglevel.controller: "info"
  loglevel.webhook: "info"

---
# Copyright 2019 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-observability
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/config-propagation: original
    knative.dev/config-category: eventing
data:
  _example: |
    ################################
    #                              #
    #    EXAMPLE CONFIGURATION     #
    #                              #
    ################################

    # This block is not actually functional configuration,
    # but serves to illustrate the available configuration
    # options and document them in a way that is accessible
    # to users that `kubectl edit` this config map.
    #
    # These sample configuration options may be copied out of
    # this example block and unindented to be in the data block
    # to actually change the configuration.

    # metrics.backend-destination field specifies the system metrics destination.
    # It supports either prometheus (the default) or stackdriver.
    # Note: Using stackdriver will incur additional charges
    metrics.backend-destination: prometheus

    # metrics.request-metrics-backend-destination specifies the request metrics
    # destination. If non-empty, it enables queue proxy to send request metrics.
    # Currently supported values: prometheus, stackdriver.
    metrics.request-metrics-backend-destination: prometheus

    # metrics.stackdriver-project-id field specifies the stackdriver project ID. This
    # field is optional. When running on GCE, application default credentials will be
    # used if this field is not provided.
    metrics.stackdriver-project-id: "<your stackdriver project id>"

    # metrics.allow-stackdriver-custom-metrics indicates whether it is allowed to send metrics to
    # Stackdriver using "global" resource type and custom metric type if the
    # metrics are not supported by "knative_broker", "knative_trigger", and "knative_source" resource types.
    # Setting this flag to "true" could cause extra Stackdriver charge.
    # If metrics.backend-destination is not Stackdriver, this is ignored.
    metrics.allow-stackdriver-custom-metrics: "false"

    # profiling.enable indicates whether it is allowed to retrieve runtime profiling data from
    # the pods via an HTTP server in the format expected by the pprof visualization tool. When
    # enabled, the Knative Eventing pods expose the profiling data on an alternate HTTP port 8008.
    # The HTTP context root for profiling is then /debug/pprof/.
    profiling.enable: "false"

---
# Copyright 2019 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-tracing
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/config-propagation: original
    knative.dev/config-category: eventing
data:
  _example: |
    ################################
    #                              #
    #    EXAMPLE CONFIGURATION     #
    #                              #
    ################################
    # This block is not actually functional configuration,
    # but serves to illustrate the available configuration
    # options and document them in a way that is accessible
    # to users that `kubectl edit` this config map.
    #
    # These sample configuration options may be copied out of
    # this example block and unindented to be in the data block
    # to actually change the configuration.
    #
    # This may be "zipkin" or "stackdriver", the default is "none"
    backend: "none"

    # URL to zipkin collector where traces are sent.
    # This must be specified when backend is "zipkin"
    zipkin-endpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans"

    # The GCP project into which stackdriver metrics will be written
    # when backend is "stackdriver".  If unspecified, the project-id
    # is read from GCP metadata when running on GCP.
    stackdriver-project-id: "my-project"

    # Enable zipkin debug mode. This allows all spans to be sent to the server
    # bypassing sampling.
    debug: "false"

    # Percentage (0-1) of requests to trace
    sample-rate: "0.1"

---
# 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: eventing-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventing-controller
  template:
    metadata:
      labels:
        app: eventing-controller
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: eventing-controller
      containers:
      - name: eventing-controller
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/controller@sha256:e738961834f9b696b88d5316cb7c45e6a15e26ccbb78fa79686b2dfd4bceceaf
        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
        - # PingSource
          name: PING_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/ping/adapter@sha256:bf2460d44868c9adcabc4f53d5224559a76df8b90c12d2bf67f05e0c6cf57b3c
        - name: JOB_RUNNER_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/ping/jobrunner@sha256:9838d57f6cd0a43621af4aeec6371fb0d8c69adfb49740755f9034f2d4f04278
        - # APIServerSource
          name: APISERVER_RA_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/apiserver_receive_adapter@sha256:8c7c8ef39a961d7cc49eec8acaf874fa063c2973d863d0e5e2e7b693e01b31dd
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008

---
# 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
#
#     https://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: eventing-webhook
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels: &labels
      app: eventing-webhook
      role: eventing-webhook
  template:
    metadata:
      labels: *labels
    spec:
      serviceAccountName: eventing-webhook
      containers:
      - name: eventing-webhook
        terminationMessagePolicy: FallbackToLogsOnError
        # This is the Go import path for the binary that is containerized
        # and substituted here.
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/webhook@sha256:20b5a2b3c7a5543f446de47f5b50eea9d52fee9cbd04157e92ecc2ec6f4fa08a
        resources:
          requests:
            # taken from serving.
            cpu: 20m
            memory: 20Mi
          limits:
            # taken from serving.
            cpu: 200m
            memory: 200Mi
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: METRICS_DOMAIN
          value: knative.dev/eventing
        - name: WEBHOOK_NAME
          value: eventing-webhook
          # SINK_BINDING_SELECTION_MODE specifies the NamespaceSelector and ObjectSelector
          # for the sinkbinding webhook.
          # If `inclusion` is selected, namespaces/objects labled as `bindings.knative.dev/include:true`
          # will be considered by the sinkbinding webhook;
          # If `exclusion` is selected, namespaces/objects labled as `bindings.knative.dev/exclude:true`
          # will NOT be considered by the sinkbinding webhook.
          # The default is `exclusion`.
        - name: SINK_BINDING_SELECTION_MODE
          value: "exclusion"
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: https-webhook
          containerPort: 8443
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008
---
apiVersion: v1
kind: Service
metadata:
  labels:
    eventing.knative.dev/release: "v0.14.0"
    role: eventing-webhook
  name: eventing-webhook
  namespace: knative-eventing
spec:
  ports:
  - name: https-webhook
    port: 443
    targetPort: 8443
  selector:
    role: eventing-webhook

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  creationTimestamp: null
  labels:
    eventing.knative.dev/release: "v0.14.0"
    eventing.knative.dev/source: "true"
    duck.knative.dev/source: "true"
    knative.dev/crd-install: "true"
  annotations:
    # TODO add schemas and descriptions
    registry.knative.dev/eventTypes: |
      [
        { "type": "dev.knative.apiserver.resource.add" },
        { "type": "dev.knative.apiserver.resource.delete" },
        { "type": "dev.knative.apiserver.resource.update" },
        { "type": "dev.knative.apiserver.ref.add" },
        { "type": "dev.knative.apiserver.ref.delete" },
        { "type": "dev.knative.apiserver.ref.update" }
      ]
  name: apiserversources.sources.knative.dev
spec:
  group: sources.knative.dev
  names:
    categories:
    - all
    - knative
    - eventing
    - sources
    kind: ApiServerSource
    plural: apiserversources
  scope: Namespaced
  subresources:
    status: {}
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flesh out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].reason"
  - name: Sink
    type: string
    JSONPath: ".status.sinkUri"
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1alpha2
    served: true
    storage: false

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: brokers.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
    duck.knative.dev/addressable: "true"
spec:
  group: eventing.knative.dev
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flush out the
      # schema for each version at this time as well as ensure
      # that different Broker Classes that might have different
      # fields that are not in the Broker Spec will work.
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  names:
    kind: Broker
    plural: brokers
    singular: broker
    categories:
    - all
    - knative
    - eventing
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: URL
    type: string
    JSONPath: .status.address.url
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: channels.messaging.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
    messaging.knative.dev/subscribable: "true"
    duck.knative.dev/addressable: "true"
spec:
  group: messaging.knative.dev
  preserveUnknownFields: false
  names:
    kind: Channel
    plural: channels
    singular: channel
    categories:
    - all
    - knative
    - messaging
    - channel
    shortNames:
    - ch
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: URL
    type: string
    JSONPath: .status.address.url
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              channelTemplate:
                description: "Channel implementation which dictates the durability
                  guarantees of events. If not specified then the default channel
                  is used. More information: https://knative.dev/docs/eventing/channels/default-channels."
                type: object
                properties:
                  apiVersion:
                    type: string
                    description: "API version of the channel implementation."
                    minLength: 1
                  kind:
                    type: string
                    description: "Kind of the channel implementation to use (InMemoryChannel,
                      KafkaChannel, etc.)."
                    minLength: 1
                  spec:
                    type: object
                required:
                - apiVersion
                - kind
              subscribable:
                type: object
                properties:
                  subscribers:
                    type: array
                    description: "Events received on the channel are forwarded to
                      its subscribers."
                    items:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                      required:
                      - uid
                      properties:
                        ref:
                          type: object
                          description: "a reference to a Kubernetes object from which
                            to retrieve the target URI."
                          x-kubernetes-preserve-unknown-fields: true
                          required:
                          - namespace
                          - name
                          - uid
                          properties:
                            apiVersion:
                              type: string
                            kind:
                              type: string
                            name:
                              type: string
                              minLength: 1
                            namespace:
                              type: string
                              minLength: 1
                            uid:
                              type: string
                              minLength: 1
                        uid:
                          type: string
                          description: "Used to understand the origin of the subscriber."
                          minLength: 1
                        subscriberURI:
                          type: string
                          description: "Endpoint for the subscriber."
                          minLength: 1
                        replyURI:
                          type: string
                          description: "Endpoint for the reply."
                          minLength: 1
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
  - name: v1beta1
    served: true
    storage: false
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            x-kubernetes-preserve-unknown-fields: true
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  labels:
    eventing.knative.dev/release: "v0.14.0"
    eventing.knative.dev/source: "true"
    duck.knative.dev/source: "true"
    knative.dev/crd-install: "true"
  name: containersources.sources.knative.dev
spec:
  group: sources.knative.dev
  names:
    categories:
    - all
    - knative
    - eventing
    - sources
    kind: ContainerSource
    plural: containersources
  scope: Namespaced
  subresources:
    status: {}
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flesh out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].reason"
  - name: Sink
    type: string
    JSONPath: ".status.sinkUri"
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha2
    served: true
    storage: true

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: eventtypes.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
spec:
  group: eventing.knative.dev
  names:
    kind: EventType
    plural: eventtypes
    singular: eventtype
    categories:
    - all
    - knative
    - eventing
  scope: Namespaced
  subresources:
    status: {}
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flesh out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  additionalPrinterColumns:
  - name: Type
    type: string
    JSONPath: ".spec.type"
  - name: Source
    type: string
    JSONPath: ".spec.source"
  - name: Schema
    type: string
    JSONPath: ".spec.schema"
  - name: Broker
    type: string
    JSONPath: ".spec.broker"
  - name: Description
    type: string
    JSONPath: ".spec.description"
  - # TODO remove Status https://github.com/knative/eventing/issues/2750
    name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: parallels.flows.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
    duck.knative.dev/addressable: "true"
spec:
  group: flows.knative.dev
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flush out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  names:
    kind: Parallel
    plural: parallels
    singular: parallel
    categories:
    - all
    - knative
    - eventing
    - flows
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: URL
    type: string
    JSONPath: .status.address.url
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  labels:
    eventing.knative.dev/release: "v0.14.0"
    eventing.knative.dev/source: "true"
    duck.knative.dev/source: "true"
    knative.dev/crd-install: "true"
  annotations:
    # TODO add schemas and descriptions
    registry.knative.dev/eventTypes: |
      [
        { "type": "dev.knative.sources.ping" }
      ]
  name: pingsources.sources.knative.dev
spec:
  group: sources.knative.dev
  names:
    categories:
    - all
    - knative
    - eventing
    - sources
    kind: PingSource
    plural: pingsources
  scope: Namespaced
  subresources:
    status: {}
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flesh out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].reason"
  - name: Sink
    type: string
    JSONPath: .status.sinkUri
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1alpha2
    served: true
    storage: false

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: sequences.flows.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
    duck.knative.dev/addressable: "true"
spec:
  group: flows.knative.dev
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flush out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  names:
    kind: Sequence
    plural: sequences
    singular: sequence
    categories:
    - all
    - knative
    - eventing
    - flows
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: URL
    type: string
    JSONPath: .status.address.url
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  labels:
    eventing.knative.dev/release: "v0.14.0"
    eventing.knative.dev/source: "true"
    duck.knative.dev/source: "true"
    duck.knative.dev/binding: "true"
    knative.dev/crd-install: "true"
  name: sinkbindings.sources.knative.dev
spec:
  group: sources.knative.dev
  names:
    categories:
    - all
    - knative
    - eventing
    - sources
    - bindings
    kind: SinkBinding
    plural: sinkbindings
  scope: Namespaced
  subresources:
    status: {}
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flesh out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type=='Ready')].reason"
  - name: Sink
    type: string
    JSONPath: ".status.sinkUri"
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1alpha2
    served: true
    storage: false

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: subscriptions.messaging.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
spec:
  group: messaging.knative.dev
  preserveUnknownFields: false
  names:
    kind: Subscription
    plural: subscriptions
    singular: subscription
    categories:
    - all
    - knative
    - eventing
    shortNames:
    - sub
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: None
    #    strategy: Webhook
    #    webhookClientConfig:
    #      service:
    #        name: eventing-webhook
    #        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  validation:
    openAPIV3Schema:
      type: object
      properties:
        spec:
          required:
          - channel
          type: object
          properties:
            channel:
              type: object
              description: "Channel that forwards incoming events to the subscription."
              required:
              - apiVersion
              - kind
              - name
              properties:
                apiVersion:
                  type: string
                  minLength: 1
                kind:
                  type: string
                name:
                  type: string
                  minLength: 1
            subscriber:
              type: object
              description: "the subscriber that (optionally) processes events."
              properties:
                uri:
                  type: string
                  description: "the target URI or, if ref is provided, a relative
                    URI reference that will be combined with ref to produce a target
                    URI."
                  minLength: 1
                ref:
                  type: object
                  description: "a reference to a Kubernetes object from which to retrieve
                    the target URI."
                  required:
                  - apiVersion
                  - kind
                  - name
                  properties:
                    apiVersion:
                      type: string
                      minLength: 1
                    kind:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    namespace:
                      type: string
                      minLength: 1
            reply:
              type: object
              description: "the destination that (optionally) receive events."
              properties:
                uri:
                  type: string
                  description: "the target URI or, if ref is provided, a relative
                    URI reference that will be combined with ref to produce a target
                    URI."
                  minLength: 1
                ref:
                  type: object
                  description: "a reference to a Kubernetes object from which to retrieve
                    the target URI."
                  required:
                  - apiVersion
                  - kind
                  - name
                  properties:
                    apiVersion:
                      type: string
                      minLength: 1
                    kind:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    namespace:
                      type: string
                      minLength: 1
            delivery:
              description: "Subscription delivery options. More information: https://knative.dev/docs/eventing/event-delivery."
              type: object
              x-kubernetes-preserve-unknown-fields: true
        status:
          type: object
          x-kubernetes-preserve-unknown-fields: true
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: triggers.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
spec:
  group: eventing.knative.dev
  preserveUnknownFields: false
  names:
    kind: Trigger
    plural: triggers
    singular: trigger
    categories:
    - all
    - knative
    - eventing
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: Broker
    type: string
    JSONPath: .spec.broker
  - name: Subscriber_URI
    type: string
    JSONPath: .status.subscriberURI
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            required:
            - subscriber
            type: object
            properties:
              broker:
                type: string
                description: "Broker that this trigger receives events from. If not
                  specified, will default to 'default'."
              filter:
                type: object
                properties:
                  sourceAndType:
                    type: object
                    properties:
                      type:
                        type: string
                      source:
                        type: string
                  attributes:
                    type: object
                    description: "Map of CloudEvents attributes used for filtering
                      events."
                    additionalProperties:
                      type: string
              subscriber:
                type: object
                description: "the destination that should receive events."
                properties:
                  ref:
                    type: object
                    description: "a reference to a Kubernetes object from which to
                      retrieve the target URI."
                    required:
                    - apiVersion
                    - kind
                    - name
                    properties:
                      apiVersion:
                        type: string
                        minLength: 1
                      kind:
                        type: string
                        minLength: 1
                      namespace:
                        type: string
                        minLength: 1
                      name:
                        type: string
                        minLength: 1
                  uri:
                    type: string
                    description: "the target URI or, if ref is provided, a relative
                      URI reference that will be combined with ref to produce a target
                      URI."
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
  - name: v1beta1
    served: true
    storage: false
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            required:
            - subscriber
            type: object
            properties:
              broker:
                type: string
                description: "Broker that this trigger receives events from. If not
                  specified, will default to 'default'."
              filter:
                type: object
                properties:
                  attributes:
                    type: object
                    description: "Map of CloudEvents attributes used for filtering
                      events."
                    additionalProperties:
                      type: string
              subscriber:
                type: object
                description: "the destination that should receive events."
                properties:
                  ref:
                    type: object
                    description: "a reference to a Kubernetes object from which to
                      retrieve the target URI."
                    required:
                    - apiVersion
                    - kind
                    - name
                    properties:
                      apiVersion:
                        type: string
                        minLength: 1
                      kind:
                        type: string
                        minLength: 1
                      namespace:
                        type: string
                        minLength: 1
                      name:
                        type: string
                        minLength: 1
                  uri:
                    type: string
                    description: "the target URI or, if ref is provided, a relative
                      URI reference that will be combined with ref to produce a target
                      URI."
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true

---
# Copyright 2019 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.

# Use this aggregated ClusterRole when you need readonly access to "Addressables"
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      duck.knative.dev/addressable: "true"
rules: [] # Rules are automatically filled in by the controller manager.
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: service-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - get
  - list
  - watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: serving-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - serving.knative.dev
  resources:
  - routes
  - routes/status
  - services
  - services/status
  verbs:
  - get
  - list
  - watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: channel-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - channels
  - channels/status
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - messaging.knative.dev
  resources:
  - channels/finalizers
  verbs:
  - update
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: broker-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - eventing.knative.dev
  resources:
  - brokers
  - brokers/status
  verbs:
  - get
  - list
  - watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: messaging-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - sequences
  - sequences/status
  - parallels
  - parallels/status
  verbs:
  - get
  - list
  - watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: flows-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - flows.knative.dev
  resources:
  - sequences
  - sequences/status
  - parallels
  - parallels/status
  verbs:
  - get
  - list
  - watch

---
# Copyright 2019 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: eventing-broker-filter
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - "get"
  - "list"
  - "watch"
- apiGroups:
  - "eventing.knative.dev"
  resources:
  - "triggers"
  - "triggers/status"
  verbs:
  - "get"
  - "list"
  - "watch"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: eventing-broker-ingress
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - "get"
  - "list"
  - "watch"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: eventing-config-reader
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - "get"
  - "list"
  - "watch"

---
# Copyright 2019 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.

# Use this aggregated ClusterRole when you need read and update permissions on "Channelables".
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: channelable-manipulator
  labels:
    eventing.knative.dev/release: "v0.14.0"
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      duck.knative.dev/channelable: "true"
rules: [] # Rules are automatically filled in by the controller manager.

---
# Copyright 2019 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.

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-eventing-namespaced-admin
  labels:
    eventing.knative.dev/release: "v0.14.0"
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["eventing.knative.dev"]
  resources: ["*"]
  verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-messaging-namespaced-admin
  labels:
    eventing.knative.dev/release: "v0.14.0"
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["messaging.knative.dev"]
  resources: ["*"]
  verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-flows-namespaced-admin
  labels:
    eventing.knative.dev/release: "v0.14.0"
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["flows.knative.dev"]
  resources: ["*"]
  verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-sources-namespaced-admin
  labels:
    eventing.knative.dev/release: "v0.14.0"
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["sources.knative.dev"]
  resources: ["*"]
  verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-eventing-namespaced-edit
  labels:
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups: ["eventing.knative.dev", "messaging.knative.dev", "flows.knative.dev"]
  resources: ["*"]
  verbs: ["create", "update", "patch", "delete"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: knative-eventing-namespaced-view
  labels:
    rbac.authorization.k8s.io/aggregate-to-view: "true"
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups: ["eventing.knative.dev", "messaging.knative.dev", "sources.knative.dev",
    flows.knative.dev]
  resources: ["*"]
  verbs: ["get", "list", "watch"]

---
# Copyright 2019 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-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "namespaces"
  - "secrets"
  - "configmaps"
  - "services"
  - "endpoints"
  - "events"
  - "serviceaccounts"
  verbs: &everything
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"
- # Brokers and the namespace annotation controllers manipulate Deployments.
  apiGroups:
  - "apps"
  resources:
  - "deployments"
  verbs: *everything
- # The namespace annotation controller needs to manipulate RoleBindings.
  apiGroups:
  - "rbac.authorization.k8s.io"
  resources:
  - "rolebindings"
  verbs: *everything
- # Our own resources and statuses we care about.
  apiGroups:
  - "eventing.knative.dev"
  resources:
  - "brokers"
  - "brokers/status"
  - "triggers"
  - "triggers/status"
  - "eventtypes"
  - "eventtypes/status"
  verbs: *everything
- # Eventing resources and finalizers we care about.
  apiGroups:
  - "eventing.knative.dev"
  resources:
  - "brokers/finalizers"
  - "triggers/finalizers"
  verbs:
  - "update"
- # Our own resources and statuses we care about.
  apiGroups:
  - "messaging.knative.dev"
  resources:
  - "sequences"
  - "sequences/status"
  - "channels"
  - "channels/status"
  - "parallels"
  - "parallels/status"
  - "subscriptions"
  - "subscriptions/status"
  verbs: *everything
- # Flow resources and statuses we care about.
  apiGroups:
  - "flows.knative.dev"
  resources:
  - "sequences"
  - "sequences/status"
  - "parallels"
  - "parallels/status"
  verbs: *everything
- # Messaging resources and finalizers we care about.
  apiGroups:
  - "messaging.knative.dev"
  resources:
  - "sequences/finalizers"
  - "parallels/finalizers"
  - "channels/finalizers"
  verbs:
  - "update"
- # Flows resources and finalizers we care about.
  apiGroups:
  - "flows.knative.dev"
  resources:
  - "sequences/finalizers"
  - "parallels/finalizers"
  verbs:
  - "update"
- # The subscription controller needs to retrieve and watch CustomResourceDefinitions.
  apiGroups:
  - "apiextensions.k8s.io"
  resources:
  - "customresourcedefinitions"
  verbs:
  - "get"
  - "list"
  - "watch"

---
# Copyright 2019 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-jobrunner
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - "get"
  - "list"
  - "watch"
- apiGroups:
  - sources.knative.dev
  resources:
  - pingsources
  - pingsources/status
  verbs:
  - get
  - list
  - watch
  - patch
- apiGroups:
  - sources.knative.dev
  resources:
  - pingsources/finalizers
  verbs:
  - "patch"
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - "create"
  - "patch"

---
# Copyright 2019 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.

# Use this aggregated ClusterRole when you need readonly access to "Addressables"
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: podspecable-binding
  labels:
    eventing.knative.dev/release: "v0.14.0"
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      duck.knative.dev/podspecable: "true"
rules: [] # Rules are automatically filled in by the controller manager.
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: builtin-podspecable-binding
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/podspecable: "true"
# Do not use this role directly. These rules will be added to the "podspecable-binding role.
rules:
- # To patch the subjects of our bindings
  apiGroups:
  - "apps"
  resources:
  - "deployments"
  - "daemonsets"
  - "statefulsets"
  - "replicasets"
  verbs:
  - "list"
  - "watch"
  - "patch"
- apiGroups:
  - "batch"
  resources:
  - "jobs"
  verbs:
  - "list"
  - "watch"
  - "patch"

---
# Copyright 2019 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.

# Use this aggregated ClusterRole when you need to read "Sources".
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: source-observer
  labels:
    eventing.knative.dev/release: "v0.14.0"
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      duck.knative.dev/source: "true"
rules: [] # Rules are automatically filled in by the controller manager.
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: eventing-sources-source-observer
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/source: "true"
# Do not use this role directly. These rules will be added to the "source-observer" role.
rules:
- apiGroups:
  - sources.knative.dev
  resources:
  - apiserversources
  - pingsources
  - sinkbindings
  - containersources
  verbs:
  - get
  - list
  - watch

---
# Copyright 2019 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-sources-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "secrets"
  - "configmaps"
  - "services"
  verbs: &everything
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"
- # Deployments admin
  apiGroups:
  - "apps"
  resources:
  - "deployments"
  verbs: *everything
- # Source resources and statuses we care about.
  apiGroups:
  - "sources.knative.dev"
  resources:
  - "sinkbindings"
  - "sinkbindings/status"
  - "sinkbindings/finalizers"
  - "apiserversources"
  - "apiserversources/status"
  - "apiserversources/finalizers"
  - "pingsources"
  - "pingsources/status"
  - "pingsources/finalizers"
  - "containersources"
  - "containersources/status"
  - "containersources/finalizers"
  verbs: *everything
- # Knative Services admin
  apiGroups:
  - serving.knative.dev
  resources:
  - services
  verbs: *everything
- # EventTypes admin
  apiGroups:
  - eventing.knative.dev
  resources:
  - eventtypes
  verbs: *everything
- # Events admin
  apiGroups:
  - ""
  resources:
  - events
  verbs: *everything
- # Authorization checker
  apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create

---
# Copyright 2019 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-webhook
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- # For watching logging configuration and getting certs.
  apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - "get"
  - "list"
  - "watch"
- # For manipulating certs into secrets.
  apiGroups:
  - ""
  resources:
  - "secrets"
  verbs:
  - "get"
  - "create"
  - "update"
  - "list"
  - "watch"
- # For getting our Deployment so we can decorate with ownerref.
  apiGroups:
  - "apps"
  resources:
  - "deployments"
  verbs:
  - "get"
- apiGroups:
  - "apps"
  resources:
  - "deployments/finalizers"
  verbs:
  - update
- # For actually registering our webhook.
  apiGroups:
  - "admissionregistration.k8s.io"
  resources:
  - "mutatingwebhookconfigurations"
  - "validatingwebhookconfigurations"
  verbs: &everything
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"
- # For running the SinkBinding reconciler.
  apiGroups:
  - "sources.knative.dev"
  resources:
  - "sinkbindings"
  - "sinkbindings/status"
  - "sinkbindings/finalizers"
  verbs: *everything
- # Necessary for conversion webhook. These are copied from the serving
  # TODO: Do we really need all these permissions?
  apiGroups: ["apiextensions.k8s.io"]
  resources: ["customresourcedefinitions"]
  verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]

---
# 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
#
#     https://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: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
  name: config.webhook.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
webhooks:
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: eventing-webhook
      namespace: knative-eventing
  sideEffects: None
  failurePolicy: Fail
  name: config.webhook.eventing.knative.dev
  namespaceSelector:
    matchExpressions:
    - key: eventing.knative.dev/release
      operator: Exists

---
# 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
#
#     https://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: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
  name: webhook.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
webhooks:
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: eventing-webhook
      namespace: knative-eventing
  sideEffects: None
  failurePolicy: Fail
  name: webhook.eventing.knative.dev

---
# 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
#
#     https://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: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
  name: validation.webhook.eventing.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
webhooks:
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: eventing-webhook
      namespace: knative-eventing
  sideEffects: None
  failurePolicy: Fail
  name: validation.webhook.eventing.knative.dev

---
# 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
#
#     https://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: v1
kind: Secret
metadata:
  name: eventing-webhook-certs
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
# The data is populated at install time.

---
# 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
#
#     https://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: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
  name: sinkbindings.webhook.sources.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
webhooks:
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: eventing-webhook
      namespace: knative-eventing
  failurePolicy: Fail
  sideEffects: None
  name: sinkbindings.webhook.sources.knative.dev

---
---
# channel-broker.yaml
# 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: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-channel-broker-controller
  apiGroup: rbac.authorization.k8s.io

---
# 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: "v0.14.0"
rules:
- # Configs resources and status we care about.
  apiGroups:
  - "configs.internal.knative.dev"
  resources:
  - "configmappropagations"
  - "configmappropagations/status"
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"
- apiGroups:
  - "configs.internal.knative.dev"
  resources:
  - "configmappropagations/finalizers"
  verbs:
  - "update"
- apiGroups:
  - ""
  resources:
  - "namespaces/finalizers"
  verbs:
  - "update"
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: configmappropagations.configs.internal.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
spec:
  group: configs.internal.knative.dev
  versions:
  - name: v1alpha1
    served: true
    storage: true
  names:
    kind: ConfigMapPropagation
    plural: configmappropagations
    singular: configmappropagation
    categories:
    - knative-internal
    shortNames:
    - kcmp
    - cmp
  scope: Namespaced
  subresources:
    status: {}
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: OriginalNamespace
    type: string
    JSONPath: ".spec.originalNamespace"
  validation:
    openAPIV3Schema:
      properties:
        spec:
          required:
          - originalNamespace
          properties:
            originalNamespace:
              type: string
              description: "The namespace where original ConfigMaps exist in."

---
# 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: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: broker-controller
  template:
    metadata:
      labels:
        app: broker-controller
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: eventing-controller
      containers:
      - name: eventing-controller
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/channel_broker@sha256:d7024d7222a4bce860d08443f57b24297d0a03ad3fbacfb52228f03e01011024
        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: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/ingress@sha256:68132f1fdda6248198c597e8c07da304127610cc7332167ce9cae4b8519a92e7
        - name: BROKER_INGRESS_SERVICE_ACCOUNT
          value: eventing-broker-ingress
        - name: BROKER_FILTER_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/filter@sha256:6ec7b1ff07e1f87104e9e7cb0f947c2a98a21bbf2db649b897e690ecbba6e883
        - 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

---
# 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: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: broker-controller
  template:
    metadata:
      labels:
        app: broker-controller
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: eventing-controller
      containers:
      - name: eventing-controller
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/channel_broker@sha256:d7024d7222a4bce860d08443f57b24297d0a03ad3fbacfb52228f03e01011024
        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: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/ingress@sha256:68132f1fdda6248198c597e8c07da304127610cc7332167ce9cae4b8519a92e7
        - name: BROKER_INGRESS_SERVICE_ACCOUNT
          value: eventing-broker-ingress
        - name: BROKER_FILTER_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/broker/filter@sha256:6ec7b1ff07e1f87104e9e7cb0f947c2a98a21bbf2db649b897e690ecbba6e883
        - 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

---
# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: configmappropagations.configs.internal.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
spec:
  group: configs.internal.knative.dev
  versions:
  - name: v1alpha1
    served: true
    storage: true
  names:
    kind: ConfigMapPropagation
    plural: configmappropagations
    singular: configmappropagation
    categories:
    - knative-internal
    shortNames:
    - kcmp
    - cmp
  scope: Namespaced
  subresources:
    status: {}
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: OriginalNamespace
    type: string
    JSONPath: ".spec.originalNamespace"
  validation:
    openAPIV3Schema:
      properties:
        spec:
          required:
          - originalNamespace
          properties:
            originalNamespace:
              type: string
              description: "The namespace where original ConfigMaps exist in."

---
# 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: "v0.14.0"
rules:
- # Configs resources and status we care about.
  apiGroups:
  - "configs.internal.knative.dev"
  resources:
  - "configmappropagations"
  - "configmappropagations/status"
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"
- apiGroups:
  - "configs.internal.knative.dev"
  resources:
  - "configmappropagations/finalizers"
  verbs:
  - "update"
- apiGroups:
  - ""
  resources:
  - "namespaces/finalizers"
  verbs:
  - "update"
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"

---
---
# mt-channel-broker.yaml
# 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-mt-channel-broker-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- # Configs resources and status we care about.
  apiGroups:
  - ""
  resources:
  - "namespaces/finalizers"
  verbs:
  - "update"
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"

---
# 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-mt-broker-filter
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - eventing.knative.dev
  resources:
  - triggers
  - triggers/status
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - get
  - list
  - watch

---
# 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: v1
kind: ServiceAccount
metadata:
  name: mt-broker-filter
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# 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-mt-broker-ingress
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - get
  - list
  - watch

---
# 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: v1
kind: ServiceAccount
metadata:
  name: mt-broker-ingress
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# 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-mt-channel-broker-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-channel-broker-controller
  apiGroup: rbac.authorization.k8s.io

---
# 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: knative-eventing-mt-broker-filter
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: mt-broker-filter
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-broker-filter
  apiGroup: rbac.authorization.k8s.io

---
# 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: knative-eventing-mt-broker-ingress
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: mt-broker-ingress
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-broker-ingress
  apiGroup: rbac.authorization.k8s.io

---
# 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: apps/v1
kind: Deployment
metadata:
  name: broker-filter
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      eventing.knative.dev/brokerRole: filter
  template:
    metadata:
      labels:
        eventing.knative.dev/brokerRole: filter
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: mt-broker-filter
      containers:
      - name: filter
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtbroker/filter@sha256:34c4b6b7bd4af654bfd29ed4c8341332d0d8294490cab76f5dd6c91c0546db15
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 9090
          name: metrics
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: CONTAINER_NAME
          value: filter
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/internal/eventing
        - name: FILTER_PORT
          value: "8080"
        securityContext:
          allowPrivilegeEscalation: false
---
apiVersion: v1
kind: Service
metadata:
  labels:
    eventing.knative.dev/brokerRole: filter
    eventing.knative.dev/release: "v0.14.0"
  name: broker-filter
  namespace: knative-eventing
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: http-metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    eventing.knative.dev/brokerRole: filter

---
# 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: apps/v1
kind: Deployment
metadata:
  name: broker-ingress
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      eventing.knative.dev/brokerRole: ingress
  template:
    metadata:
      labels:
        eventing.knative.dev/brokerRole: ingress
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: mt-broker-ingress
      containers:
      - name: ingress
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtbroker/ingress@sha256:8c4b29a520a3940bbc6a5ee4a30cafdc566e6193e2ca72026e2d87a8e946711d
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 9090
          name: metrics
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: CONTAINER_NAME
          value: ingress
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/internal/eventing
        - name: INGRESS_PORT
          value: "8080"
        securityContext:
          allowPrivilegeEscalation: false
---
apiVersion: v1
kind: Service
metadata:
  labels:
    eventing.knative.dev/brokerRole: ingress
    eventing.knative.dev/release: "v0.14.0"
  name: broker-ingress
  namespace: knative-eventing
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: http-metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    eventing.knative.dev/brokerRole: ingress

---
# 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: apps/v1
kind: Deployment
metadata:
  name: mt-broker-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mt-broker-controller
  template:
    metadata:
      labels:
        app: mt-broker-controller
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: eventing-controller
      containers:
      - name: eventing-controller
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtchannel_broker@sha256:3e6c5dd9245d0f759427121279d2363604184873396ec32280c4fcac822905a2
        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
        - # Due to the trivial per-Broker cost, we _can_ inject Brokers into every
          # namespace by default. To change this default simply change this
          # to "true".  To opt namespaces out of Broker injection, label
          # them with:
          #    knative-eventing-injection: disabled
          name: BROKER_INJECTION_DEFAULT
          value: "false"
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008

---
# 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: apps/v1
kind: Deployment
metadata:
  name: broker-filter
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      eventing.knative.dev/brokerRole: filter
  template:
    metadata:
      labels:
        eventing.knative.dev/brokerRole: filter
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: mt-broker-filter
      containers:
      - name: filter
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtbroker/filter@sha256:34c4b6b7bd4af654bfd29ed4c8341332d0d8294490cab76f5dd6c91c0546db15
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 9090
          name: metrics
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: CONTAINER_NAME
          value: filter
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/internal/eventing
        - name: FILTER_PORT
          value: "8080"
        securityContext:
          allowPrivilegeEscalation: false
---
apiVersion: v1
kind: Service
metadata:
  labels:
    eventing.knative.dev/brokerRole: filter
    eventing.knative.dev/release: "v0.14.0"
  name: broker-filter
  namespace: knative-eventing
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: http-metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    eventing.knative.dev/brokerRole: filter

---
# 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: apps/v1
kind: Deployment
metadata:
  name: broker-ingress
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      eventing.knative.dev/brokerRole: ingress
  template:
    metadata:
      labels:
        eventing.knative.dev/brokerRole: ingress
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: mt-broker-ingress
      containers:
      - name: ingress
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtbroker/ingress@sha256:8c4b29a520a3940bbc6a5ee4a30cafdc566e6193e2ca72026e2d87a8e946711d
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 9090
          name: metrics
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: CONTAINER_NAME
          value: ingress
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/internal/eventing
        - name: INGRESS_PORT
          value: "8080"
        securityContext:
          allowPrivilegeEscalation: false
---
apiVersion: v1
kind: Service
metadata:
  labels:
    eventing.knative.dev/brokerRole: ingress
    eventing.knative.dev/release: "v0.14.0"
  name: broker-ingress
  namespace: knative-eventing
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: http-metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    eventing.knative.dev/brokerRole: ingress

---
# 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: apps/v1
kind: Deployment
metadata:
  name: mt-broker-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mt-broker-controller
  template:
    metadata:
      labels:
        app: mt-broker-controller
        eventing.knative.dev/release: "v0.14.0"
    spec:
      serviceAccountName: eventing-controller
      containers:
      - name: eventing-controller
        terminationMessagePolicy: FallbackToLogsOnError
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/mtchannel_broker@sha256:3e6c5dd9245d0f759427121279d2363604184873396ec32280c4fcac822905a2
        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
        - # Due to the trivial per-Broker cost, we _can_ inject Brokers into every
          # namespace by default. To change this default simply change this
          # to "true".  To opt namespaces out of Broker injection, label
          # them with:
          #    knative-eventing-injection: disabled
          name: BROKER_INJECTION_DEFAULT
          value: "false"
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008

---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: broker-ingress-hpa
  namespace: knative-eventing
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: broker-ingress
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: broker-filter-hpa
  namespace: knative-eventing
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: broker-filter
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70

---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: broker-ingress-hpa
  namespace: knative-eventing
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: broker-ingress
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: broker-filter-hpa
  namespace: knative-eventing
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: broker-filter
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70

---
# 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-mt-channel-broker-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- # Configs resources and status we care about.
  apiGroups:
  - ""
  resources:
  - "namespaces/finalizers"
  verbs:
  - "update"
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - "get"
  - "list"
  - "create"
  - "update"
  - "delete"
  - "patch"
  - "watch"

---
# 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-mt-channel-broker-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: eventing-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-channel-broker-controller
  apiGroup: rbac.authorization.k8s.io

---
# 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-mt-broker-filter
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - eventing.knative.dev
  resources:
  - triggers
  - triggers/status
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - get
  - list
  - watch

---
# 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: knative-eventing-mt-broker-filter
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: mt-broker-filter
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-broker-filter
  apiGroup: rbac.authorization.k8s.io

---
# 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: v1
kind: ServiceAccount
metadata:
  name: mt-broker-filter
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# 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-mt-broker-ingress
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - ""
  resources:
  - "configmaps"
  verbs:
  - get
  - list
  - watch

---
# 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: knative-eventing-mt-broker-ingress
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: mt-broker-ingress
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: knative-eventing-mt-broker-ingress
  apiGroup: rbac.authorization.k8s.io

---
# 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: v1
kind: ServiceAccount
metadata:
  name: mt-broker-ingress
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
---
# in-memory-channel.yaml
# 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
#
#     https://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: v1
kind: ConfigMap
metadata:
  name: config-imc-event-dispatcher
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
data:
  MaxIdleConnections: "1000"
  MaxIdleConnectionsPerHost: "100"

---
# Copyright 2019 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: imc-addressable-resolver
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/addressable: "true"
# Do not use this role directly. These rules will be added to the "addressable-resolver" role.
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels
  - inmemorychannels/status
  verbs:
  - get
  - list
  - watch

---
# Copyright 2019 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: imc-channelable-manipulator
  labels:
    eventing.knative.dev/release: "v0.14.0"
    duck.knative.dev/channelable: "true"
# Do not use this role directly. These rules will be added to the "channelable-manipulator" role.
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels
  - inmemorychannels/status
  verbs:
  - create
  - get
  - list
  - watch
  - update
  - patch

---
# Copyright 2019 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: imc-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels
  - inmemorychannels/status
  verbs:
  - get
  - list
  - watch
  - update
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels/finalizers
  verbs:
  - update
- apiGroups:
  - ""
  resources:
  - services
  - serviceaccounts
  verbs: &everything
  - get
  - list
  - watch
  - create
  - update
  - patch
- apiGroups:
  - ""
  resources:
  - endpoints
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - "rbac.authorization.k8s.io"
  resources:
  - rolebindings
  verbs: *everything
- apiGroups:
  - apps
  resources:
  - deployments
  verbs: *everything
- apiGroups:
  - apps
  resources:
  - deployments/status
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - create
  - patch
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs: *everything

---
# Copyright 2019 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: imc-dispatcher
  labels:
    eventing.knative.dev/release: "v0.14.0"
rules:
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels
  - inmemorychannels/status
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - "" # Core API group.
  resources:
  - configmaps
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - create
  - patch
  # Updates the status to reflect subscribable status.
- apiGroups:
  - messaging.knative.dev
  resources:
  - inmemorychannels/status
  verbs:
  - update
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch

---
# Copyright 2019 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: v1
kind: Service
metadata:
  name: imc-dispatcher
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
    messaging.knative.dev/channel: in-memory-channel
    messaging.knative.dev/role: dispatcher
spec:
  selector:
    messaging.knative.dev/channel: in-memory-channel
    messaging.knative.dev/role: dispatcher
  ports:
  - name: http-dispatcher
    port: 80
    protocol: TCP
    targetPort: 8080

---
# 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: v1
kind: ServiceAccount
metadata:
  name: imc-dispatcher
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# Copyright 2019 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: v1
kind: ServiceAccount
metadata:
  name: imc-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"

---
# Copyright 2019 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: imc-controller
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: imc-controller
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: imc-controller
  apiGroup: rbac.authorization.k8s.io

---
# 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: imc-dispatcher
  labels:
    eventing.knative.dev/release: "v0.14.0"
subjects:
- kind: ServiceAccount
  name: imc-dispatcher
  namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: imc-dispatcher
  apiGroup: rbac.authorization.k8s.io

---
# Copyright 2019 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: inmemorychannels.messaging.knative.dev
  labels:
    eventing.knative.dev/release: "v0.14.0"
    knative.dev/crd-install: "true"
    messaging.knative.dev/subscribable: "true"
    duck.knative.dev/addressable: "true"
spec:
  group: messaging.knative.dev
  preserveUnknownFields: false
  validation:
    openAPIV3Schema:
      type: object
      # this is a work around so we don't need to flush out the
      # schema for each version at this time
      #
      # see issue: https://github.com/knative/serving/issues/912
      x-kubernetes-preserve-unknown-fields: true
  names:
    kind: InMemoryChannel
    plural: inmemorychannels
    singular: inmemorychannel
    categories:
    - all
    - knative
    - messaging
    - channel
    shortNames:
    - imc
  scope: Namespaced
  subresources:
    status: {}
  conversion:
    strategy: Webhook
    webhookClientConfig:
      service:
        name: eventing-webhook
        namespace: knative-eventing
  additionalPrinterColumns:
  - name: Ready
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].status"
  - name: Reason
    type: string
    JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  - name: URL
    type: string
    JSONPath: .status.address.url
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  versions:
  - name: v1alpha1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

---
# Copyright 2019 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: imc-controller
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels: &labels
      messaging.knative.dev/channel: in-memory-channel
      messaging.knative.dev/role: controller
  template:
    metadata:
      labels: *labels
    spec:
      serviceAccountName: imc-controller
      containers:
      - name: controller
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_controller@sha256:be6bf108d5f10dc113423efb52b5547352d295cabc22a6d332d61a7affe7356c
        env:
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/inmemorychannel-controller
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: DISPATCHER_IMAGE
          value: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:5ddf8d202419a6c9cc54fa39543871aed289679179f630858af90eb6b563429b
        securityContext:
          allowPrivilegeEscalation: false
        ports:
        - name: metrics
          containerPort: 9090
        - name: profiling
          containerPort: 8008

---
# Copyright 2019 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: imc-dispatcher
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.14.0"
spec:
  replicas: 1
  selector:
    matchLabels: &labels
      messaging.knative.dev/channel: in-memory-channel
      messaging.knative.dev/role: dispatcher
  template:
    metadata:
      labels: *labels
    spec:
      serviceAccountName: imc-dispatcher
      containers:
      - name: dispatcher
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:5ddf8d202419a6c9cc54fa39543871aed289679179f630858af90eb6b563429b
        env:
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/inmemorychannel-dispatcher
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        ports:
        - containerPort: 9090
          name: metrics
        resources:
          # Set resource requests and limits based on the benchmarking results in
          # https://github.com/knative/eventing/issues/2311#issuecomment-565311345
          requests:
            cpu: 1000m
            memory: 256Mi
          limits:
            cpu: 2200m
            memory: 2048Mi

---
