apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: gpio-fastapi
  name: gpio-fastapi
  namespace: gpio
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gpio-fastapi
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25% 
  template:
    metadata:
      labels:
        app: gpio-fastapi
    spec:
      containers:
        - image: linuxrobotgeek/gpio-fastapi:latest
          name: gpio-fastapi
          resources:
            requests:
              memory: 64Mi
              cpu: 250m
            limits:
              memory: 128Mi
              cpu: 500m
          ports:
            - containerPort: 8000
              protocol: TCP
          
