apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-demo
  namespace: default
  labels:
    app: frontend-demo
    type: frontend
spec:
  replicas: 0
  selector:
    matchLabels:
      app: frontend-demo
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: frontend-demo
    spec:
      containers:
      - name: app
        image: "{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}"
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /health
            port: 80
            httpHeaders:
            - name: Health-Check
              value: health-check
          initialDelaySeconds: 30
          periodSeconds: 10
          failureThreshold: 3
