apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: front
  name: front
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate: 
      maxSurge: 30%
      maxUnavailable: 10%
  selector:
    matchLabels:
      app: front
  template:
    metadata:
      labels:
        app: front
    spec:
      terminationGracePeriodSeconds: 180
      containers:
        - image: xxxx.azurecr.io/frontend:v1.0.0
          name: front
          resources: {}
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8080
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 5
          lifecycle:
            preStop:
              exec:
                command: ["sh", "-c", "sleep 180"]
          volumeMounts:
            - name: config-volume
              mountPath: /workspace/config
          imagePullPolicy: Always
      volumes:
        - name: config-volume
          configMap:
            name: front-configmap
