apiVersion: apps/v1
kind: Deployment
metadata:
  name: caller-node
  labels:
    app: caller-node
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: caller-node
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: caller-node
    spec:
      containers:
      - image: vladiko/caller-node:latest
        imagePullPolicy: Always
        name: caller-node
        ports:
        - containerPort: 3000
          protocol: TCP
        env:
        - name: TEST_NODE_URL
          value: "test-node.default.svc.cluster.local"
        lifecycle:
          preStop:
            httpGet:
              path: close
              port: 3000
      terminationGracePeriodSeconds: 20
