apiVersion: apps/v1
kind: Deployment
metadata:
  name: abi-cloud-qr-platform-service
  labels:
    app: abi-cloud-qr-platform-service
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 25%
  selector:
    matchLabels:
      app: abi-cloud-qr-platform-service
  template:
    metadata:
      labels:
        app: abi-cloud-qr-platform-service
    spec:
      containers:
        - name: abi-cloud-qr-platform-service
          image: registry-vpc.cn-shanghai.aliyuncs.com/ab-inbev-apac/abi-cloud-qr-platform-service:${currentVersion}
          #image: ${image_tag}
          imagePullPolicy: Always
          env:
            - name: SPRING_PROFILES_ACTIVE
              valueFrom:
                configMapKeyRef:
                  name: env
                  key: spring.profiles.active
            # Time Zone config
            - name: TZ
              value: Asia/Shanghai
            - name: aliyun_logs_abi-cloud-qr-platform-service-center-log
              value: stdout
          ports:
            - containerPort: 8080
          readinessProbe:
            tcpSocket:
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 10
          volumeMounts:
            - mountPath: /app/tmp
              name: tmp-volume
      volumes:
        - name: tmp-volume
          emptyDir: { }
      imagePullSecrets:
        - name: acr-credential-27b7396c3bc51e6df6ffbf8189648a39