apiVersion: batch/v1
kind: Job
metadata:
  name: v0.16.0-broker-cleanup
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: "v0.16.0"
spec:
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      serviceAccountName: eventing-controller
      restartPolicy: Never
      containers:
      - name: brokers
        image: gcr.io/knative-releases/knative.dev/eventing/cmd/v0.16/broker-cleanup@sha256:9decf1a44a1f7aa654517be6caaa5a1db2d38285ece4e56b3148851086b65480
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace

# Note the following ENVVAR settings exist:
# SYSTEM_NAMESPACE - the namespace of the control plane, defaults to knative-eventing
# REPLACEMENT_BROKER_CLASS - the broker class to update ChannelBroker to, defaults to MTChannelBroker.
# DRY_RUN - a flag to run the script without deleting or updating, defaults to false.

---
