apiVersion: apps/v1
kind: Deployment
metadata:
  name: auditservice-subscriber
  annotations:
    sidecar.jaegertracing.io/inject: jaeger
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: auditservice-subscriber
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: auditservice-subscriber
    spec:
      containers:
      - name: auditservice-subscriber
        command:
        - subscriber
        image: 380838443567.dkr.ecr.us-west-2.amazonaws.com/dbaas/prod/auditservice:7673c57c063eb5ab0aaf47665890fc8ade557b1e
        imagePullPolicy: IfNotPresent
        env:
        - name: DB_DSN
          valueFrom:
            secretKeyRef:
              name: auditservice-secrets
              key: DB_DSN
              optional: false
        readinessProbe:
          httpGet:
            port: 11000
            path: /healthz
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 5
          failureThreshold: 10
        resources:
          limits:
            cpu: 500m
            memory: 512Mi
          requests:
            cpu: 500m
            memory: 512Mi
        volumeMounts:
        - mountPath: /etc/dbaas
          name: auditservice-config
          readOnly: true
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      serviceAccount: central
      serviceAccountName: central
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          name: argo-auditservice-conf
        name: auditservice-config
