kind: Deployment
apiVersion: apps/v1
metadata:
  name: login-basic-app
  labels:
    app: login-basic-app
    component: microservice
spec:
  selector:
    matchLabels:
      app: login-basic-app
      component: microservice
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 100%
      maxUnavailable: 0
  progressDeadlineSeconds: 300
  template:
    metadata:
      name: login-basic-app
      labels:
        app: login-basic-app
        component: microservice
    spec:
      terminationGracePeriodSeconds: 600
      containers:
      - name: app
        image: 348686912638.dkr.ecr.ap-northeast-1.amazonaws.com/beee-login-basic-app
        readinessProbe:
          failureThreshold: 3
          successThreshold: 1
          httpGet:
            path: /health_check
            port: login-basic-app
          initialDelaySeconds: 1
          periodSeconds: 10
          timeoutSeconds: 3
        lifecycle:
          preStop:
            exec:
              command: [ "/bin/sleep", "20" ]
        env:
          - name: NODE_ENV
            value: dev
          - name: PRODUCT_UI_URL
            valueFrom:
              configMapKeyRef:
                name: login-basic-app-configs
                key: PRODUCT_UI_URL
        envFrom:
        - configMapRef:
            name: login-basic-app-configs
        resources:
          requests:
            memory: "64Mi"
            cpu: "30m"
          limits: {}
        imagePullPolicy: Always
        ports:
        - name: login-basic-app
          containerPort: 80
        volumeMounts:
          - name: login-basic-app-configs
            mountPath: /var/www/config.js
            subPath: config.js
      - name: dnsmasq
        image: "janeczku/go-dnsmasq:release-1.0.7"
        args:
          - --listen
          - "127.0.0.1:53"
          - --default-resolver
          - --enable-search
        resources: {}
      volumes:
        - name: login-basic-app-configs
          configMap:
              name: login-basic-app-configs
      #nodeSelector:
      #  type: node00