apiVersion: apps/v1
kind: Deployment
metadata:
  name: paymentservice-bg
  labels:
    app: paymentservice-bg
spec:
  replicas: 3
  strategy:
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 0
  selector:
    matchLabels:
      app: paymentservice-bg
  template:
    metadata:
      labels:
        app: paymentservice-bg
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image:  docker.io/mrvovanness/kubernetes-intro-web:demo-paymentservice-2
        ports:
        - containerPort: 50051
        env:
        - name: PORT
          value: "50051"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:50051"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:50051"]
