---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: eventbus-controller
  namespace: argo-events
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventbus-controller
  template:
    metadata:
      labels:
        app: eventbus-controller
    spec:
      containers:
      - args:
        - eventbus-controller
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: NATS_STREAMING_IMAGE
          value: nats-streaming:0.17.0
        - name: NATS_METRICS_EXPORTER_IMAGE
          value: synadia/prometheus-nats-exporter:0.6.2
        image: quay.io/argoproj/argo-events:v1.4.0
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 3
          periodSeconds: 3
        name: eventbus-controller
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 3
          periodSeconds: 3
      securityContext:
        runAsNonRoot: true
        runAsUser: 9731
      serviceAccountName: argo-events-sa
