apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "4"
  labels:
    k8s-app: vaccination-api
  name: vaccination-api
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: vaccination-api
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        k8s-app: vaccination-api
      name: vaccination-api
    spec:
      containers:
        - image: dockerhub/vaccination_api
          imagePullPolicy: Always
          envFrom:
            - configMapRef:
                name: divoc-config
            - secretRef:
                name: divoc-secrets
          name: vaccination-api
          resources:
            requests:
              cpu: 60m
            limits:
              cpu: 200m
          livenessProbe:
            tcpSocket:
              port: 8000
            initialDelaySeconds: 2
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /divoc/api/v1/ping
              port: 8000
            initialDelaySeconds: 5
            periodSeconds: 5
          securityContext:
            privileged: false
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30