feat: add Docker, Drone CI, and k8s deployment manifests
- Dockerfile for Python 3.12 FastAPI app - Drone CI pipeline to build and push to internal registry - Kubernetes manifests (Deployment, Service, Secret, Namespace) - ArgoCD Application for GitOps deployment - Kustomize base configuration
This commit is contained in:
56
k8s/base/deployment.yaml
Normal file
56
k8s/base/deployment.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: invest-api
|
||||
namespace: invest-api
|
||||
labels:
|
||||
app: invest-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: invest-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: invest-api
|
||||
spec:
|
||||
containers:
|
||||
- name: invest-api
|
||||
image: 192.168.68.11:30500/invest-api:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: INVEST_API_HOST
|
||||
value: "0.0.0.0"
|
||||
- name: INVEST_API_PORT
|
||||
value: "8000"
|
||||
- name: INVEST_API_LOG_LEVEL
|
||||
value: "info"
|
||||
- name: INVEST_API_CORS_ORIGINS
|
||||
value: '["*"]'
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: invest-api-secrets
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
Reference in New Issue
Block a user