apiVersion: apps/v1
kind: Deployment
metadata:
  name: eventsource-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventsource-controller
  template:
    metadata:
      labels:
        app: eventsource-controller
    spec:
      serviceAccountName: argo-events-sa
      securityContext:
        runAsNonRoot: true
        runAsUser: 9731
      containers:
        - name: eventsource-controller
          image: quay.io/argoproj/argo-events:latest
          imagePullPolicy: Always
          args:
            - eventsource-controller
          env:
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: EVENTSOURCE_IMAGE
              value: quay.io/argoproj/argo-events:latest
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 3
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 3
            periodSeconds: 3
