apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-gateway
  labels:
    app: api-gateway
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: api-gateway
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: api-gateway
    spec:
      serviceAccountName: spring-cloud
      containers:
      - image: 328169871404.dkr.ecr.us-east-1.amazonaws.com/api-gateway-eks:latest
        imagePullPolicy: Always
        name: api-gateway
        command: ["/bin/sh","-c"]
        args: ["/springCloud/env.sh"]
        # command: ["/bin/sh","-c","while : ; do date >> /tmp/test.txt; sleep 1; done;"]
        ports:
        - containerPort: 8081
          protocol: TCP
