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