apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: application-controller
    app.kubernetes.io/managed-by: karavel
    app.kubernetes.io/name: argocd-application-controller
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/version: 2.2.0
    karavel.io/component-name: argocd
    karavel.io/component-version: 0.1.0-SNAPSHOT
  name: argocd-application-controller
  namespace: argocd
spec:
  replicas: 1
  revisionHistoryLimit: 5
  selector:
    matchLabels:
      app.kubernetes.io/component: application-controller
      app.kubernetes.io/managed-by: karavel
      app.kubernetes.io/name: argocd-application-controller
      app.kubernetes.io/part-of: argocd
      karavel.io/component-name: argocd
  serviceName: argocd-application-controller-headless
  template:
    metadata:
      labels:
        app.kubernetes.io/component: application-controller
        app.kubernetes.io/managed-by: karavel
        app.kubernetes.io/name: argocd-application-controller
        app.kubernetes.io/part-of: argocd
        app.kubernetes.io/version: 2.2.0
        karavel.io/component-name: argocd
        karavel.io/component-version: 0.1.0-SNAPSHOT
    spec:
      containers:
      - command:
        - argocd-application-controller
        - --status-processors
        - "30"
        - --operation-processors
        - "15"
        - --repo-server
        - argocd-repo-server:8081
        - --logformat
        - text
        - --loglevel
        - info
        - --redis
        - argocd-redis:6379
        env:
        - name: ARGOCD_CONTROLLER_REPLICAS
          value: "1"
        image: quay.io/argoproj/argocd:v2.2.0
        imagePullPolicy: IfNotPresent
        name: application-controller
        ports:
        - containerPort: 8082
          name: controller
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 8082
          timeoutSeconds: 1
        resources:
          limits:
            cpu: "2"
            memory: 3Gi
          requests:
            cpu: "2"
            memory: 3Gi
      priorityClassName: system-cluster-critical
      serviceAccountName: argocd-application-controller
