apiVersion: apps/v1
kind: Deployment
metadata:
  name: pypodinfo
spec:
  replicas: 2
  minReadySeconds: 3
  revisionHistoryLimit: 5
  progressDeadlineSeconds: 60
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: pypodinfo
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: pypodinfo
    spec:
      containers:
        - name: pypodinfo
          image: docker.io/steveww/pypodinfo:latest
          imagePullPolicy: Always
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5
          readinessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 5
            timeoutSeconds: 5
          resources:
            limits:
              cpu: 2000m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 32Mi

