apiVersion: apps/v1
kind: Deployment
metadata:
  name: flow-repository
  namespace: oih-dev-ns
spec:
  replicas: 1
  selector:
    matchLabels:
      app: flow-repository
  template:
    metadata:
      labels:
        app: flow-repository
    spec:
      containers:
      - name: flow-repository
        image: openintegrationhub/flow-repository:latest
        ports:
        - containerPort: 3001
        envFrom:
        - configMapRef:
            name: flow-repository
        env:
        - name: MONGODB_URL
          valueFrom:
            secretKeyRef:
              name: flow-repository
              key: "mongourl"
        - name: IAM_TOKEN
          valueFrom:
            secretKeyRef:
              name: flow-repository
              key: "iamtoken"
        resources:
          limits:
            cpu: "0.1"
            memory: 500Mi
        livenessProbe:
          httpGet:
            port: 3001
            path: /healthcheck
          initialDelaySeconds: 120
          timeoutSeconds: 1
        readinessProbe:
          httpGet:
            port: 3001
            path: /healthcheck
          initialDelaySeconds: 10
          timeoutSeconds: 1
        imagePullPolicy: Always
