feat: Add CI/CD pipeline with Docker build and K8s deployment
Add Dockerfile (multi-stage, python:3.11-slim + uv), K8s manifests (Deployment + Service), and extend CI workflow with build-push-deploy stages targeting Gitea registry and K3s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
55
k8s/deployment.yaml
Normal file
55
k8s/deployment.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: haproxy-mcp
|
||||
namespace: default
|
||||
labels:
|
||||
app: haproxy-mcp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: haproxy-mcp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: haproxy-mcp
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: haproxy-mcp
|
||||
image: gitea.anvil.it.com/kaffa/haproxy-mcp:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: MCP_HOST
|
||||
value: "0.0.0.0"
|
||||
- name: MCP_PORT
|
||||
value: "8000"
|
||||
- name: HAPROXY_HOST
|
||||
value: "10.253.100.107"
|
||||
- name: HAPROXY_PORT
|
||||
value: "9999"
|
||||
- name: LOG_LEVEL
|
||||
value: "INFO"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /mcp
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /mcp
|
||||
port: 8000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
16
k8s/service.yaml
Normal file
16
k8s/service.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: haproxy-mcp
|
||||
namespace: default
|
||||
labels:
|
||||
app: haproxy-mcp
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: haproxy-mcp
|
||||
ports:
|
||||
- port: 8000
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
name: mcp
|
||||
Reference in New Issue
Block a user