apiVersion: apps/v1
kind: Deployment
metadata:
  name: alameda-executor
  namespace: alameda
  labels:
    app: alameda
    component: alameda-executor
spec:
  selector:
    matchLabels:
      component: alameda-executor
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: alameda
        component: alameda-executor
    spec:
      serviceAccountName: alameda-executor
      containers:
      - name: alameda-executor
        image: quay.io/prophetstor/alameda-executor-ubi:v0.3.8
        imagePullPolicy: Always
        volumeMounts:
          - name: alameda-executor-config
            mountPath: /etc/alameda/federatorai-execution/config.yml
            subPath: config.yml
        readinessProbe:
          exec:
            command:
            - /usr/local/bin/federatorai-executor
            - probe
            - --type=readiness
          initialDelaySeconds: 5
          periodSeconds: 5
        livenessProbe:
          exec:
            command:
            - /usr/local/bin/federatorai-executor
            - probe
            - --type=liveness
          initialDelaySeconds: 5
          periodSeconds: 5
      volumes:
        - name: alameda-executor-data-storage
        - name: alameda-executor-log-storage
        - name: alameda-executor-config
          configMap:
            name: alameda-executor-config
