apiVersion: v1
kind: ServiceAccount
metadata:
  name: imc-controller
  namespace: knative-eventing
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: imc-controller
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
subjects:
  - kind: ServiceAccount
    name: imc-controller
    namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: imc-controller
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  namespace: knative-eventing
  name: imc-controller
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
subjects:
  - kind: ServiceAccount
    name: imc-controller
    namespace: knative-eventing
roleRef:
  kind: Role
  name: knative-inmemorychannel-webhook
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: imc-controller-resolver
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
subjects:
  - kind: ServiceAccount
    name: imc-controller
    namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: addressable-resolver
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: imc-dispatcher
  namespace: knative-eventing
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: imc-dispatcher
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
subjects:
  - kind: ServiceAccount
    name: imc-dispatcher
    namespace: knative-eventing
roleRef:
  kind: ClusterRole
  name: imc-dispatcher
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: imc-dispatcher-tls-role-binding
  namespace: knative-eventing
subjects:
  - kind: ServiceAccount
    name: imc-dispatcher
    apiGroup: ""
roleRef:
  kind: Role
  name: imc-dispatcher-tls-role
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: imc-dispatcher-tls-role
  namespace: knative-eventing
rules:
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
      - list
      - watch
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-imc-event-dispatcher
  namespace: knative-eventing
  labels:
    app.kubernetes.io/component: imc-controller
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
data:
  MaxIdleConnections: "1000"
  MaxIdleConnectionsPerHost: "100"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: imc-controller
  namespace: knative-eventing
  labels:
    knative.dev/high-availability: "true"
    app.kubernetes.io/component: imc-controller
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
    bindings.knative.dev/exclude: "true"
spec:
  selector:
    matchLabels:
      messaging.knative.dev/channel: in-memory-channel
      messaging.knative.dev/role: controller
  template:
    metadata:
      labels:
        messaging.knative.dev/channel: in-memory-channel
        messaging.knative.dev/role: controller
        app.kubernetes.io/component: imc-controller
        app.kubernetes.io/version: "1.16.4"
        app.kubernetes.io/name: knative-eventing
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    messaging.knative.dev/channel: in-memory-channel
                    messaging.knative.dev/role: controller
                topologyKey: kubernetes.io/hostname
              weight: 100
      serviceAccountName: imc-controller
      enableServiceLinks: false
      containers:
        - name: controller
          image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_controller@sha256:b71eb30909c369c1c8c07185e7ec4c75f874e36696eca563b93df70959e7a619
          env:
            - name: WEBHOOK_NAME
              value: inmemorychannel-webhook
            - name: WEBHOOK_PORT
              value: "8443"
            - 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:185f51cd8fa39e598b86463ee04a843560db40bbb235c1611e4579ebebfe9133
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
            seccompProfile:
              type: RuntimeDefault
          ports:
            - name: metrics
              containerPort: 9090
            - name: profiling
              containerPort: 8008
            - name: https-webhook
              containerPort: 8443
          readinessProbe:
            periodSeconds: 1
            httpGet:
              scheme: HTTPS
              port: 8443
              httpHeaders:
                - name: k-kubelet-probe
                  value: "webhook"
          livenessProbe:
            periodSeconds: 1
            httpGet:
              scheme: HTTPS
              port: 8443
              httpHeaders:
                - name: k-kubelet-probe
                  value: "webhook"
            initialDelaySeconds: 120
      terminationGracePeriodSeconds: 300
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/component: imc-controller
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
  name: inmemorychannel-webhook
  namespace: knative-eventing
spec:
  ports:
    - name: https-webhook
      port: 443
      targetPort: 8443
    - name: http-metrics
      port: 9090
      targetPort: 9090
    - name: http-profiling
      port: 8008
      targetPort: 8008
  selector:
    messaging.knative.dev/channel: in-memory-channel
    messaging.knative.dev/role: controller
---
apiVersion: v1
kind: Service
metadata:
  name: imc-dispatcher
  namespace: knative-eventing
  labels:
    messaging.knative.dev/channel: in-memory-channel
    messaging.knative.dev/role: dispatcher
    app.kubernetes.io/component: imc-dispatcher
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
spec:
  selector:
    messaging.knative.dev/channel: in-memory-channel
    messaging.knative.dev/role: dispatcher
  ports:
    - name: http-dispatcher
      port: 80
      protocol: TCP
      targetPort: 8080
    - name: https-dispatcher
      port: 443
      protocol: TCP
      targetPort: 8443
    - name: http-metrics
      port: 9090
      targetPort: 9090
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: imc-dispatcher
  namespace: knative-eventing
  labels:
    knative.dev/high-availability: "true"
    app.kubernetes.io/component: imc-dispatcher
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
    bindings.knative.dev/exclude: "true"
spec:
  selector:
    matchLabels:
      messaging.knative.dev/channel: in-memory-channel
      messaging.knative.dev/role: dispatcher
  template:
    metadata:
      labels:
        messaging.knative.dev/channel: in-memory-channel
        messaging.knative.dev/role: dispatcher
        app.kubernetes.io/component: imc-dispatcher
        app.kubernetes.io/version: "1.16.4"
        app.kubernetes.io/name: knative-eventing
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    messaging.knative.dev/channel: in-memory-channel
                    messaging.knative.dev/role: dispatcher
                topologyKey: kubernetes.io/hostname
              weight: 100
      serviceAccountName: imc-dispatcher
      enableServiceLinks: false
      containers:
        - name: dispatcher
          image: gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:185f51cd8fa39e598b86463ee04a843560db40bbb235c1611e4579ebebfe9133
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: 8080
              scheme: HTTP
            periodSeconds: 2
            successThreshold: 1
            timeoutSeconds: 1
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: 8080
              scheme: HTTP
            periodSeconds: 2
            successThreshold: 1
            timeoutSeconds: 1
            initialDelaySeconds: 5
          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
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: CONTAINER_NAME
              value: dispatcher
            - name: MAX_IDLE_CONNS
              value: "1000"
            - name: MAX_IDLE_CONNS_PER_HOST
              value: "1000"
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
            - containerPort: 8443
              name: https
              protocol: TCP
            - containerPort: 9090
              name: metrics
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
            seccompProfile:
              type: RuntimeDefault
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: inmemorychannels.messaging.knative.dev
  labels:
    knative.dev/crd-install: "true"
    messaging.knative.dev/subscribable: "true"
    duck.knative.dev/addressable: "true"
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
spec:
  group: messaging.knative.dev
  versions:
    - name: v1
      served: true
      storage: true
      subresources:
        status: {}
      schema:
        openAPIV3Schema:
          description: 'InMemoryChannel is a resource representing an in memory channel'
          type: object
          properties:
            spec:
              description: Spec defines the desired state of the Channel.
              type: object
              properties:
                delivery:
                  description: DeliverySpec contains the default delivery spec for each subscription to this Channelable. Each subscription delivery spec, if any, overrides this global delivery spec.
                  type: object
                  properties:
                    backoffDelay:
                      description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601  For linear policy, backoff delay is backoffDelay*<numberOfRetries>. For exponential policy, backoff delay is backoffDelay*2^<numberOfRetries>.'
                      type: string
                    backoffPolicy:
                      description: BackoffPolicy is the retry backoff policy (linear, exponential).
                      type: string
                    deadLetterSink:
                      description: DeadLetterSink is the sink receiving event that could not be sent to a destination.
                      type: object
                      properties:
                        ref:
                          description: Ref points to an Addressable.
                          type: object
                          properties:
                            apiVersion:
                              description: API version of the referent.
                              type: string
                            kind:
                              description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
                              type: string
                            name:
                              description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
                              type: string
                            namespace:
                              description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
                              type: string
                        uri:
                          description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
                          type: string
                        CACerts:
                          description: Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
                          type: string
                        audience:
                          description: Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the target itself. If specified, it takes precedence over the target's Audience.
                          type: string
                    retry:
                      description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
                      type: integer
                      format: int32
                  x-kubernetes-preserve-unknown-fields: true
                subscribers:
                  description: This is the list of subscriptions for this subscribable.
                  type: array
                  items:
                    type: object
                    properties:
                      delivery:
                        description: DeliverySpec contains options controlling the event delivery
                        type: object
                        properties:
                          backoffDelay:
                            description: 'BackoffDelay is the delay before retrying. More information on Duration format: - https://www.iso.org/iso-8601-date-and-time-format.html - https://en.wikipedia.org/wiki/ISO_8601  For linear policy, backoff delay is backoffDelay*<numberOfRetries>. For exponential policy, backoff delay is backoffDelay*2^<numberOfRetries>.'
                            type: string
                          backoffPolicy:
                            description: BackoffPolicy is the retry backoff policy (linear, exponential).
                            type: string
                          deadLetterSink:
                            description: DeadLetterSink is the sink receiving event that could not be sent to a destination.
                            type: object
                            properties:
                              ref:
                                description: Ref points to an Addressable.
                                type: object
                                properties:
                                  apiVersion:
                                    description: API version of the referent.
                                    type: string
                                  kind:
                                    description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
                                    type: string
                                  name:
                                    description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
                                    type: string
                                  namespace:
                                    description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
                                    type: string
                              uri:
                                description: URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
                                type: string
                              CACerts:
                                description: Certification Authority (CA) certificates in PEM format that the source trusts when sending events to the sink.
                                type: string
                              audience:
                                description: Audience is the OIDC audience. This only needs to be set if the target is not an Addressable and thus the Audience can't be received from the target itself. If specified, it takes precedence over the target's Audience.
                                type: string
                          retry:
                            description: Retry is the minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink.
                            type: integer
                            format: int32
                        x-kubernetes-preserve-unknown-fields: true
                      generation:
                        description: Generation of the origin of the subscriber with uid:UID.
                        type: integer
                        format: int64
                      name:
                        description: The name of the subscription
                        type: string
                      namespace:
                        description: The namespace of the subscription
                        type: string
                      replyUri:
                        description: ReplyURI is the endpoint for the reply
                        type: string
                      replyCACerts:
                        description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
                        type: string
                      replyAudience:
                        description: ReplyAudience is the OIDC audience for the replyUri.
                        type: string
                      subscriberUri:
                        description: SubscriberURI is the endpoint for the subscriber
                        type: string
                      subscriberCACerts:
                        description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
                        type: string
                      subscriberAudience:
                        description: SubscriberAudience is the OIDC audience for the subscriberUri.
                        type: string
                      uid:
                        description: UID is used to understand the origin of the subscriber.
                        type: string
                      auth:
                        description: Auth provides the relevant information for OIDC authentication.
                        type: object
                        properties:
                          serviceAccountName:
                            description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
                            type: string
                          serviceAccountNames:
                            description: ServiceAccountNames is the list of names of the generated service accounts used for this components OIDC authentication.
                            type: array
                            items:
                              type: string
            status:
              description: Status represents the current state of the Channel. This data may be out of date.
              type: object
              properties:
                address:
                  description: InMemoryChannel is Addressable. It exposes the endpoint as an URI to get events delivered into the channel mesh.
                  type: object
                  properties:
                    name:
                      type: string
                    url:
                      type: string
                    CACerts:
                      type: string
                    audience:
                      type: string
                addresses:
                  description: InMemoryChannel is Addressable. It exposes the endpoints as URIs to get events delivered into the channel mesh.
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      url:
                        type: string
                      CACerts:
                        type: string
                      audience:
                        type: string
                annotations:
                  description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                policies:
                  description: List of applied EventPolicies
                  type: array
                  items:
                    type: object
                    properties:
                      apiVersion:
                        description: The API version of the applied EventPolicy. This indicates, which version of EventPolicy is supported by the resource.
                        type: string
                      name:
                        description: The name of the applied EventPolicy
                        type: string
                conditions:
                  description: Conditions the latest available observations of a resource's current state.
                  type: array
                  items:
                    type: object
                    required:
                      - type
                      - status
                    properties:
                      lastTransitionTime:
                        description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant).
                        type: string
                      message:
                        description: A human readable message indicating details about the transition.
                        type: string
                      reason:
                        description: The reason for the condition's last transition.
                        type: string
                      severity:
                        description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error.
                        type: string
                      status:
                        description: Status of the condition, one of True, False, Unknown.
                        type: string
                      type:
                        description: Type of condition.
                        type: string
                deadLetterChannel:
                  description: DeadLetterChannel is a KReference and is set by the channel when it supports native error handling via a channel Failed messages are delivered here.
                  type: object
                  properties:
                    apiVersion:
                      description: API version of the referent.
                      type: string
                    kind:
                      description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
                      type: string
                    name:
                      description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
                      type: string
                    namespace:
                      description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ This is optional field, it gets defaulted to the object holding it if left out.'
                      type: string
                deadLetterSinkUri:
                  description: DeadLetterSinkURI is the resolved URI of the dead letter ref if one is specified in the Spec.Delivery.
                  type: string
                deadLetterSinkCACerts:
                  description: Certification Authority (CA) certificates in PEM format according to https://www.rfc-editor.org/rfc/rfc7468.
                  type: string
                deadLetterSinkAudience:
                  description: OIDC audience of the dead letter sink.
                  type: string
                observedGeneration:
                  description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller.
                  type: integer
                  format: int64
                subscribers:
                  description: This is the list of subscription's statuses for this channel.
                  type: array
                  items:
                    type: object
                    properties:
                      message:
                        description: A human readable message indicating details of Ready status.
                        type: string
                      observedGeneration:
                        description: Generation of the origin of the subscriber with uid:UID.
                        type: integer
                        format: int64
                      ready:
                        description: Status of the subscriber.
                        type: string
                      uid:
                        description: UID is used to understand the origin of the subscriber.
                        type: string
                      auth:
                        description: Auth provides the relevant information for OIDC authentication.
                        type: object
                        properties:
                          serviceAccountName:
                            description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
                            type: string
                          serviceAccountNames:
                            description: ServiceAccountNames is the list of names of the generated service accounts used for this components OIDC authentication.
                            type: array
                            items:
                              type: string
      additionalPrinterColumns:
        - name: URL
          type: string
          jsonPath: .status.address.url
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp
        - name: Ready
          type: string
          jsonPath: ".status.conditions[?(@.type==\"Ready\")].status"
        - name: Reason
          type: string
          jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason"
  names:
    kind: InMemoryChannel
    plural: inmemorychannels
    singular: inmemorychannel
    categories:
      - all
      - knative
      - messaging
      - channel
    shortNames:
      - imc
  scope: Namespaced
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: imc-addressable-resolver
  labels:
    duck.knative.dev/addressable: "true"
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels
      - inmemorychannels/status
    verbs:
      - get
      - list
      - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: imc-channelable-manipulator
  labels:
    duck.knative.dev/channelable: "true"
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels
      - inmemorychannels/status
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: imc-controller
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels
      - inmemorychannels/status
    verbs:
      - get
      - list
      - watch
      - update
      - knsubscribe
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels/finalizers
    verbs:
      - update
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels/finalizers
      - inmemorychannels/status
      - inmemorychannels
    verbs:
      - patch
  - apiGroups:
      - eventing.knative.dev
    resources:
      - eventpolicies
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - services
      - serviceaccounts
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
  - apiGroups:
      - ""
    resources:
      - endpoints
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "rbac.authorization.k8s.io"
    resources:
      - rolebindings
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
  - apiGroups:
      - apps
    resources:
      - deployments
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
  - 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:
      - get
      - list
      - watch
      - create
      - update
      - patch
  - apiGroups:
      - "admissionregistration.k8s.io"
    resources:
      - "mutatingwebhookconfigurations"
      - "validatingwebhookconfigurations"
    verbs:
      - "get"
      - "list"
      - "create"
      - "update"
      - "delete"
      - "patch"
      - "watch"
  - apiGroups:
      - ""
    resources:
      - "namespaces"
    verbs:
      - "get"
      - "create"
      - "update"
      - "list"
      - "watch"
      - "patch"
  - apiGroups:
      - ""
    resources:
      - "namespaces/finalizers"
    verbs:
      - "update"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: imc-subscriber
  labels:
    duck.knative.dev/crossnamespace-subscribable: "true"
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels
    verbs:
      - knsubscribe
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: imc-dispatcher
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels
      - inmemorychannels/status
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - create
      - patch
  - apiGroups:
      - ""
    resources:
      - "serviceaccounts/token"
    verbs:
      - create
  - apiGroups:
      - messaging.knative.dev
    resources:
      - inmemorychannels/finalizers
      - inmemorychannels/status
      - inmemorychannels
    verbs:
      - patch
  - apiGroups:
      - coordination.k8s.io
    resources:
      - leases
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
  - apiGroups:
      - eventing.knative.dev
    resources:
      - eventtypes
      - eventpolicies
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - eventing.knative.dev
    resources:
      - eventtypes
    verbs:
      - create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: knative-eventing
  name: knative-inmemorychannel-webhook
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
rules:
  - apiGroups:
      - ""
    resources:
      - "secrets"
    verbs:
      - "get"
      - "create"
      - "update"
      - "list"
      - "watch"
      - "patch"
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: inmemorychannel.eventing.knative.dev
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
webhooks:
  - admissionReviewVersions: ["v1"]
    clientConfig:
      service:
        name: inmemorychannel-webhook
        namespace: knative-eventing
    sideEffects: None
    failurePolicy: Fail
    name: inmemorychannel.eventing.knative.dev
    timeoutSeconds: 10
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: validation.inmemorychannel.eventing.knative.dev
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
webhooks:
  - admissionReviewVersions: ["v1"]
    clientConfig:
      service:
        name: inmemorychannel-webhook
        namespace: knative-eventing
    sideEffects: None
    failurePolicy: Fail
    name: validation.inmemorychannel.eventing.knative.dev
    timeoutSeconds: 10
---
apiVersion: v1
kind: Secret
metadata:
  name: inmemorychannel-webhook-certs
  namespace: knative-eventing
  labels:
    app.kubernetes.io/version: "1.16.4"
    app.kubernetes.io/name: knative-eventing
---

