╔══════════════════════════════════════════════════════════════════════╗
║           Claude Code Agent Monitor - Deployment Notes              ║
╚══════════════════════════════════════════════════════════════════════╝

{{- $fullName := include "agent-monitor.fullname" . -}}

🎉 {{ $fullName }} has been deployed to namespace "{{ .Release.Namespace }}"!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📡 Accessing the Dashboard:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
  {{- range .paths }}

  URL: http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
  {{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}

  export NODE_PORT=$(kubectl get -n {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ $fullName }})
  export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
  echo "Dashboard URL: http://$NODE_IP:$NODE_PORT"

{{- else if contains "LoadBalancer" .Values.service.type }}

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  Watch status with:
    kubectl get -n {{ .Release.Namespace }} svc {{ $fullName }} -w

  export SERVICE_IP=$(kubectl get svc -n {{ .Release.Namespace }} {{ $fullName }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
  echo "Dashboard URL: http://$SERVICE_IP:{{ .Values.service.port }}"

{{- else }}

  Port-forward to access locally:
    kubectl port-forward -n {{ .Release.Namespace }} svc/{{ $fullName }} 4820:{{ .Values.service.port }}

  Then open: http://localhost:4820

{{- end }}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔍 Health Check:
  kubectl exec -n {{ .Release.Namespace }} deploy/{{ $fullName }} -- wget -qO- http://localhost:{{ .Values.service.targetPort }}/api/health

🧪 Run Tests:
  helm test {{ .Release.Name }} -n {{ .Release.Namespace }}

📊 View Logs:
  kubectl logs -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "agent-monitor.name" . }} -f

📈 Check Pods:
  kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "agent-monitor.name" . }}

{{- if .Values.persistence.enabled }}

💾 Persistent Storage:
  SQLite data is stored on PVC: {{ $fullName }}-data ({{ .Values.persistence.size }})
{{- end }}

{{- if .Values.mcp.enabled }}

🔌 MCP Sidecar:
  MCP server is running on port {{ .Values.mcp.port }}
  Access via: kubectl port-forward -n {{ .Release.Namespace }} svc/{{ $fullName }} {{ .Values.mcp.port }}:{{ .Values.mcp.port }}
{{- end }}

{{- if .Values.autoscaling.enabled }}

📐 Autoscaling:
  Min replicas: {{ .Values.autoscaling.minReplicas }}
  Max replicas: {{ .Values.autoscaling.maxReplicas }}
  CPU target:   {{ .Values.autoscaling.targetCPUUtilizationPercentage }}%
  Memory target: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}%
{{- end }}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
