apiVersion: batch/v1
kind: Job
metadata:
  name: v0.16.0-broker-cleanup
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: devel
spec:
  ttlSecondsAfterFinished: 600
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      serviceAccountName: eventing-controller
      restartPolicy: Never
      containers:
        - name: brokers
          image: ko://knative.dev/eventing/cmd/v0.16/broker-cleanup
          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.
