apiVersion: apps/v1
kind: Deployment
metadata:
  name: fast-api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: fast-api
  template:
    metadata:
      labels:
        app: fast-api
    spec:
      containers:
        - image: <CONTAINER REGISTRY>/fast-api:latest  -- Replace <CONTAINER REGISTRY> with a valid url
          name: fast-api
          command: ["alembic", "upgrade", "head", "&&", "python", "-m", "src.main"]
          ports:
            - name: http
              containerPort: 8000
          envFrom:
            - secretRef:
                name: fast-api-secret
          resources:
            requests:
              memory: "256Mi"
              cpu: "300m"
