apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: ${NAMESPACE}
  name: prow-patch-propagator
  labels:
    app: prow-patch-propagator
spec:
  replicas: 1 # Do not scale up.
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: prow-patch-propagator
  template:
    metadata:
      labels:
        app: prow-patch-propagator
    spec:
      serviceAccountName: "prow-deployer"
      containers:
        - name: prow-patch-propagator
          image: ${CONTAINER_REGISTRY}/${CONTAINER_REPOSITORY}/prow-patch-propagator:latest
          args:
            - --dry-run=false
            - --config-path=/etc/config/config.yaml
          volumeMounts:
            - name: hmac
              mountPath: /etc/webhook
              readOnly: true
            - name: config
              mountPath: /etc/config
              readOnly: true
            - name: plugins
              mountPath: /etc/plugins
              readOnly: true
      volumes:
        - name: hmac
          secret:
            secretName: hmac-token
        - name: config
          configMap:
            name: config
        - name: plugins
          configMap:
            name: plugins
