apiVersion: apps/v1
kind: Deployment
metadata:
  name: paymentservice-v2
spec:
  selector:
    matchLabels:
      app: paymentservice
  template:
    metadata:
      labels:
        app: paymentservice
        version: v2
    spec:
      serviceAccountName: default
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: bakjos/paymentservice:v0.2.4
        ports:
        - containerPort: 50051
        env:
        - name: PORT
          value: "50051"
        - name: FAIL_ALL
          value: "true"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:50051"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:50051"]
        resources:
          requests:
            cpu: 100m
            memory: 64Mi
          limits:
            cpu: 200m
            memory: 128Mi