apiVersion: apps/v1
kind: Deployment

metadata:
  namespace: singouins-dev
  name: sep-backend-resolver
  labels:
    tier: sep-backend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: resolver
      tier: sep-backend
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "false"
        prometheus.io/port: "5000"
      labels:
        app: resolver
        tier: sep-backend
    spec:

      containers:
      - name: sep-backend-resolver
        image: lordslair/resolver:latest
        #command: ["/bin/sh"]
        #args: ["-c", "while :; do sleep 12h; done;"]
        resources:
          limits:
            memory: 512Mi
            cpu: 1000m
          requests:
            memory: 256Mi
            cpu: 100m
        env:
          - name: NODE_ENV
            value: 'development'
          - name: QUIET
            value: 'False'
          - name: GIT_REPO
            valueFrom:
              secretKeyRef:
                name: sep-backend-resolver-secret
                key: resolver-git-repo
          - name: GIT_USER
            valueFrom:
              secretKeyRef:
                name: sep-backend-resolver-secret
                key: resolver-git-user
          - name: GIT_TOKEN
            valueFrom:
              secretKeyRef:
                name: sep-backend-resolver-secret
                key: resolver-git-token
          - name: APP_PATH
            valueFrom:
              secretKeyRef:
                name: sep-backend-resolver-secret
                key: resolver-app-path
