apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kubesail-node-docker
    tier: frontend
    deployedBy: deploy-node-app
  name: kubesail-node-docker-frontend
spec:
  minReadySeconds: 5
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: kubesail-node-docker
      tier: frontend
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: kubesail-node-docker
        tier: frontend
        deployedBy: deploy-node-app
    spec:
      containers:
        - image: 'hafizhin/kubesail-node-docker:1a71d91-1600647670'
          imagePullPolicy: Always
          name: kubesail-node-docker
          command:
            - nginx
            - '-g'
            - daemon off;
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          resources:
            limits:
              cpu: 150m
              memory: 64Mi
            requests:
              cpu: 3m
              memory: 32Mi
          volumeMounts:
            - name: config
              mountPath: /etc/nginx/nginx.conf
              subPath: nginx.conf
      volumes:
        - name: config
          configMap:
            name: nginx-configmap
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      imagePullSecrets:
        - name: kubesail-node-docker-regcred

