apiVersion: apps/v1
kind: Deployment
metadata:
  name: alameda-operator
  namespace: federatorai
  labels:
    app: alameda
    component: alameda-operator
  annotations:
    description: Defines how to deploy the application alameda-operator
    template.alpha.openshift.io/wait-for-ready: 'true'
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      component: alameda-operator
  template:
    metadata:
      name: alameda-operator
      labels:
        app: alameda
        component: alameda-operator
    spec:
      containers:
      - name: alameda-operator
        image: quay.io/prophetstor/alameda-operator-ubi:v0.3.8
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: 10m
            memory: 20Mi
        env:
        - name: NAMESPACE_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: ALAMEDA_OPERATOR_DATAHUB_ADDRESS
          value: "alameda-datahub.federatorai.svc:50050"
        volumeMounts:
        - name: podinfo
          mountPath: /etc/podinfo
          readOnly: false
        readinessProbe:
          exec:
            command:
            - /usr/local/bin/manager
            - --readiness-probe
          initialDelaySeconds: 5
          failureThreshold: 20
          periodSeconds: 5
        livenessProbe:
          exec:
            command:
            - /usr/local/bin/manager
            - --liveness-probe
          initialDelaySeconds: 5
          failureThreshold: 20
          periodSeconds: 5
      volumes:
      - name:  alameda-operator-data-storage
      - name:  alameda-operator-log-storage
      - name: podinfo
        downwardAPI:
          items:
          - path: "labels"
            fieldRef:
              fieldPath: metadata.labels
      serviceAccount: alameda-operator
      serviceAccountName: alameda-operator
