apiVersion: apps/v1
kind: Deployment
metadata:
  name: nodejs-demo
  namespace: digitalavenue-dev
  labels:
    app: nodejs-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nodejs-demo
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 2
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: nodejs-demo
    spec:
      # nodeSelector:
      #   "beta.kubernetes.io/os": linux
      containers:
      - name: nodejs-demo
        image: dimuit86/nodejs-demo-app:latest
        ports:
        - containerPort: 3000
        # envFrom:
        #   - configMapRef:
        #       name: env-config
        resources:
          requests:
            memory: "180Mi"
            cpu: "100m"
          limits:
            memory: "200Mi"
            cpu: "200m"