apiVersion: apps/v1
kind: Deployment
metadata:
  name: simple-blog-api
  labels:
    app: python
spec:
  replicas: 3
  selector:
    matchLabels:
      app: python
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 33%
  template:
    metadata:
      labels:
        app: python
    spec:
      containers:
        - name: python
          image: inkletblot/simple-blog-api:<VERSION>
          ports:
            - containerPort: 5000
          livenessProbe:
            httpGet:
              path: /posts
              port: 5000
            initialDelaySeconds: 2
            periodSeconds: 2
          readinessProbe:
            httpGet:
              path: /posts
              port: 5000
            initialDelaySeconds: 2
            periodSeconds: 2