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

Your release is named {{ .Release.Name }}.

To learn more about the release, try:

  $ helm status {{ .Release.Name }} -n {{ .Release.Namespace }}
  $ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }}

==================================================================================
LLM Cost Ops Platform - Installation Summary
==================================================================================

1. Application Status:

   Get the application URL:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
  {{- range .paths }}
  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
  {{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "llm-cost-ops.fullname" . }})
  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.service.type }}
     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
           You can watch the status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "llm-cost-ops.fullname" . }}'
  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "llm-cost-ops.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
  echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "llm-cost-ops.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -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:8080 to use your application"
  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

2. Health Check:

   Check if the application is healthy:
   $ kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "llm-cost-ops.name" . }}

{{- if .Values.config.metrics.enabled }}

3. Metrics:

   The Prometheus metrics endpoint is available at:
   - Port: {{ .Values.config.metrics.port }}
   - Path: {{ .Values.config.metrics.path }}

{{- if .Values.serviceMonitor.enabled }}
   ServiceMonitor for Prometheus Operator has been created.
{{- end }}
{{- end }}

{{- if .Values.postgresql.enabled }}

4. Database:

   PostgreSQL database has been deployed:
   - Database: {{ .Values.postgresql.auth.database }}
   - User: {{ .Values.postgresql.auth.username }}
   - Service: {{ include "llm-cost-ops.postgresql.fullname" . }}:{{ .Values.postgresql.service.port }}

   To connect to the database:
   $ kubectl run postgresql-client --rm -it --restart='Never' --namespace {{ .Release.Namespace }} --image {{ include "llm-cost-ops.postgresql.image" . }} --env="PGPASSWORD={{ .Values.postgresql.auth.password }}" --command -- psql --host {{ include "llm-cost-ops.postgresql.fullname" . }} -U {{ .Values.postgresql.auth.username }} -d {{ .Values.postgresql.auth.database }}
{{- end }}

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

5. Autoscaling:

   Horizontal Pod Autoscaler is enabled:
   - Min replicas: {{ .Values.autoscaling.minReplicas }}
   - Max replicas: {{ .Values.autoscaling.maxReplicas }}
   {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
   - Target CPU: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}%
   {{- end }}
   {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
   - Target Memory: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}%
   {{- end }}
{{- end }}

{{- if .Values.networkPolicy.enabled }}

6. Network Policy:

   Network policies have been applied for enhanced security.
{{- end }}

==================================================================================
Configuration Details:
==================================================================================

{{- if .Values.config.auth.enabled }}
- Authentication: ENABLED
  {{- if .Values.config.auth.rbac.enabled }}
  - RBAC: ENABLED
  {{- end }}
{{- else }}
- Authentication: DISABLED (Not recommended for production)
{{- end }}

{{- if .Values.config.rateLimit.enabled }}
- Rate Limiting: ENABLED ({{ .Values.config.rateLimit.requestsPerSec }} req/sec)
{{- end }}

{{- if .Values.config.streaming.enabled }}
- Event Streaming: ENABLED ({{ .Values.config.streaming.backend }})
{{- end }}

{{- if .Values.config.forecasting.enabled }}
- Cost Forecasting: ENABLED
{{- end }}

{{- if .Values.config.budgetAlerts.enabled }}
- Budget Alerts: ENABLED
{{- end }}

==================================================================================
Useful Commands:
==================================================================================

View logs:
  $ kubectl logs -f -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "llm-cost-ops.name" . }}

Execute a command in the container:
  $ kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pod -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "llm-cost-ops.name" . }} -o jsonpath='{.items[0].metadata.name}') -- /bin/sh

Run tests:
  $ helm test {{ .Release.Name }} -n {{ .Release.Namespace }}

Upgrade the release:
  $ helm upgrade {{ .Release.Name }} llm-cost-ops/llm-cost-ops -n {{ .Release.Namespace }}

==================================================================================
Security Notes:
==================================================================================

{{- if and .Values.config.auth.enabled (not .Values.config.auth.jwt.existingSecret) }}
⚠️  WARNING: You are using an inline JWT secret. For production deployments,
   use an existing Kubernetes secret by setting:
   --set config.auth.jwt.existingSecret=<secret-name>
{{- end }}

{{- if and (eq .Values.config.database.type "postgres") (not .Values.config.database.existingSecret) }}
⚠️  WARNING: You are using an inline database password. For production deployments,
   use an existing Kubernetes secret by setting:
   --set config.database.existingSecret=<secret-name>
{{- end }}

{{- if not .Values.ingress.tls }}
⚠️  WARNING: TLS is not configured for ingress. Consider enabling TLS for production.
{{- end }}

==================================================================================
Documentation:
==================================================================================

For more information about LLM Cost Ops, visit:
- GitHub: https://github.com/llm-devops/llm-cost-ops
- Documentation: https://llm-cost-ops.io/docs

For support, please open an issue on GitHub or contact support@llm-cost-ops.io

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