apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: httpbin
  name: httpbin
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: httpbin
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: httpbin
    spec:
      containers:
        - image: docker.io/dmuth1/fastapi-httpbin:latest
          imagePullPolicy: Always
          name: httpbin
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /get
              port: http
          readinessProbe:
            httpGet:
              path: /get
              port: http
          resources:
            requests:
              memory: 64Mi
              cpu: 150m
            limits:
              memory: 256Mi
              cpu: 300m
          securityContext:
            runAsUser: 1000
            runAsGroup: 1000
