apiVersion: apps/v1
kind: Deployment
metadata:
  name: eventbus-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventbus-controller
  template:
    metadata:
      labels:
        app: eventbus-controller
    spec:
      serviceAccountName: argo-events-sa
      securityContext:
        runAsNonRoot: true
        runAsUser: 9731
      containers:
        - name: eventbus-controller
          image: argoproj/eventbus-controller:latest
          imagePullPolicy: Always
          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
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 3
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 3
            periodSeconds: 3


