apiVersion: apps/v1
kind: Deployment
metadata:
  name: vapora-mcp-server
  namespace: vapora
  labels:
    app: vapora-mcp-server
    component: mcp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: vapora-mcp-server
  template:
    metadata:
      labels:
        app: vapora-mcp-server
        component: mcp
    spec:
      containers:
      - name: mcp-server
        image: vapora/mcp-server:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
          name: http
          protocol: TCP
        env:
        - name: RUST_LOG
          value: "info,vapora_mcp_server=debug"
        args:
        - "--port"
        - "3000"
        livenessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 5
          periodSeconds: 10
          timeoutSeconds: 3
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 2
          periodSeconds: 5
          timeoutSeconds: 2
          failureThreshold: 3
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 200m
            memory: 256Mi

---
apiVersion: v1
kind: Service
metadata:
  name: vapora-mcp-server
  namespace: vapora
  labels:
    app: vapora-mcp-server
    component: mcp
spec:
  selector:
    app: vapora-mcp-server
  ports:
  - port: 3000
    targetPort: 3000
    name: http
    protocol: TCP
  type: ClusterIP
