==============================================================================
Heretek OpenClaw - Deployment Complete
==============================================================================

Thank you for installing {{ .Chart.Name }} v{{ .Chart.Version }}!

Application Version: {{ .Chart.AppVersion }}

==============================================================================
GETTING STARTED
==============================================================================

1. Get the application URLs by running these commands:

{{- if .Values.gateway.ingress.enabled }}
{{- range $host := .Values.gateway.ingress.hosts }}
  http{{ if $.Values.gateway.ingress.tls }}s{{ end }}://{{ $host.host }}{{ (index $host.paths 0).path }}
{{- end }}
{{- else if contains "NodePort" .Values.gateway.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "openclaw.fullname" . }}-gateway)
  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.gateway.service.type }}
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openclaw.fullname" . }}-gateway'
  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openclaw.fullname" . }}-gateway --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
  echo http://$SERVICE_IP:{{ .Values.gateway.service.port }}
{{- else if contains "ClusterIP" .Values.gateway.service.type }}
  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openclaw.name" . }},app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=gateway" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:18789 to access OpenClaw Gateway"
  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 18789:$CONTAINER_PORT
{{- end }}

2. Access Langfuse Dashboard:
{{- if .Values.langfuse.enabled }}
{{- if .Values.langfuse.ingress.enabled }}
{{- range $host := .Values.langfuse.ingress.hosts }}
  http{{ if $.Values.langfuse.ingress.tls }}s{{ end }}://{{ $host.host }}{{ (index $host.paths 0).path }}
{{- end }}
{{- else }}
  kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "openclaw.fullname" . }}-langfuse 3000:3000
  echo "Visit http://127.0.0.1:3000 to access Langfuse Dashboard"
{{- end }}
{{- else }}
  Langfuse is disabled. Enable it in values.yaml to access observability features.
{{- end }}

3. Access LiteLLM Gateway:
  kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "openclaw.fullname" . }}-litellm 4000:4000
  echo "LiteLLM Gateway available at http://127.0.0.1:4000"

==============================================================================
COMPONENT STATUS
==============================================================================

{{- if .Values.gateway.replicaCount }}
✓ OpenClaw Gateway: {{ .Values.gateway.replicaCount }} replica(s)
{{- end }}
{{- if .Values.litellm.enabled }}
✓ LiteLLM Gateway: {{ .Values.litellm.replicaCount }} replica(s)
{{- end }}
{{- if .Values.postgresql.enabled }}
✓ PostgreSQL (pgvector): {{ .Values.postgresql.replicaCount }} replica(s)
{{- end }}
{{- if .Values.redis.enabled }}
✓ Redis: {{ .Values.redis.replicaCount }} replica(s)
{{- end }}
{{- if .Values.ollama.enabled }}
✓ Ollama: {{ if .Values.ollama.gpu.enabled }}GPU-enabled{{ else }}CPU-only{{ end }}
{{- end }}
{{- if .Values.neo4j.enabled }}
✓ Neo4j (GraphRAG): 1 replica
{{- end }}
{{- if .Values.langfuse.enabled }}
✓ Langfuse Observability: 1 replica
{{- end }}

==============================================================================
NEXT STEPS
==============================================================================

1. Configure API keys and secrets:
   kubectl create secret generic {{ include "openclaw.fullname" . }}-secrets \
     --namespace {{ .Release.Namespace }} \
     --from-literal=minimax-api-key=YOUR_MINIMAX_KEY \
     --from-literal=zai-api-key=YOUR_ZAI_KEY \
     --from-literal=litellm-master-key=YOUR_LITELLM_KEY

2. Update the secret reference in values.yaml

3. For production deployments:
   - Enable autoscaling: gateway.autoscaling.enabled=true
   - Configure external secrets: externalSecrets.enabled=true
   - Enable network policies: networkPolicy.enabled=true
   - Configure persistence for all stateful components

4. Monitor the deployment:
   kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}"
   kubectl logs --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}" -f

==============================================================================
TROUBLESHOOTING
==============================================================================

For troubleshooting guides and runbooks, see:
  docs/operations/runbook-troubleshooting.md
  docs/operations/runbook-monitoring-operations.md

==============================================================================
