apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcp-telemetry-bridge
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels: { app: mcp-telemetry-bridge }
  template:
    metadata:
      labels: { app: mcp-telemetry-bridge }
    spec:
      serviceAccountName: {{ .Values.serviceAccount.name }}
      containers:
        - name: bridge
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: 8000
          env:
          {{- range .Values.env }}
            - name: {{ .name }}
              value: "{{ .value }}"
          {{- end }}
          readinessProbe:
            httpGet: { path: /healthz, port: http }
            initialDelaySeconds: 3
            periodSeconds: 5
          livenessProbe:
            httpGet: { path: /healthz, port: http }
            initialDelaySeconds: 10
            periodSeconds: 10
          resources:
{{ toYaml .Values.resources | indent 12 }}
