apiVersion: apps/v1
kind: Deployment
metadata:
  name: deploy
  labels: &labels
    app: demo-app-api
  annotations:
    argocd.argoproj.io/sync-wave: "1"
    argocd.argoproj.io/hook: Sync
spec:
  selector:
    matchLabels: *labels
  template:
    metadata:
      labels: *labels
    spec:
      restartPolicy: Always
      containers:
      - name: demo-app
        image: justinzamora02/nodejs-demo-application
        ports:
        - name: http-web-api
          containerPort: 3000
        envFrom:
        - configMapRef:
            name: cm
        - secretRef:
            name: demo-app-secret
        resources:
          limits:
            cpu: 200m
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 100Mi
        livenessProbe: &probe
          httpGet:
            port: http-web-api
            path: /healthz
          periodSeconds: 5
          successThreshold: 1
          timeoutSeconds: 5
        readinessProbe: *probe
