1
0

app-deployment.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ident "@(#)$Format:LocalFoodAI:app.py:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$"
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: food-ai-app
  6. namespace: food-ai
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: food-ai-app
  12. template:
  13. metadata:
  14. labels:
  15. app: food-ai-app
  16. spec:
  17. containers:
  18. - name: app
  19. image: food-ai-app:latest
  20. ports:
  21. - containerPort: 8501
  22. env:
  23. - name: LOG_PATH
  24. value: "/logs"
  25. - name: EMAIL_USER
  26. valueFrom:
  27. secretKeyRef:
  28. name: food-ai-secrets
  29. key: EMAIL_USER
  30. - name: EMAIL_PASS
  31. valueFrom:
  32. secretKeyRef:
  33. name: food-ai-secrets
  34. key: EMAIL_PASS
  35. volumeMounts:
  36. - name: logs
  37. mountPath: /logs
  38. resources:
  39. limits:
  40. cpu: "1"
  41. memory: "1Gi"
  42. requests:
  43. cpu: "500m"
  44. memory: "512Mi"
  45. volumes:
  46. - name: logs
  47. persistentVolumeClaim:
  48. claimName: logs-pvc