
 _    _                 _                        _ _____
| |  | |               | |                      / |___ /
| |  | | __ _ _ __ ___| |__   ___  _   _ ___  / /  |_ \
| |/\| |/ _` | '__/ _ \ '_ \ / _ \| | | / __|/ /  ___) |
\  /\  / (_| | | |  __/ | | | (_) | |_| \__ \_/  |____/
 \/  \/ \__,_|_|  \___|_| |_|\___/ \__,_|___(_)

Enterprise Test Artifact Storage has been deployed!

Chart Name: {{ .Chart.Name }}
Chart Version: {{ .Chart.Version }}
App Version: {{ .Chart.AppVersion }}

Release Name: {{ .Release.Name }}
Namespace: {{ .Release.Namespace }}

---

DEPLOYMENT INFORMATION:

{{- if .Values.app.enabled }}
Application (Unified API + Frontend):
  Service: warehouse13-app
  Replicas: {{ .Values.app.replicas }}
  Image: {{ .Values.app.image.repository }}:{{ .Values.app.image.tag }}
  Port: {{ .Values.app.service.port }}
  Note: Multi-stage build includes both Angular frontend and FastAPI backend
{{- end }}

{{- if .Values.postgres.enabled }}
PostgreSQL:
  Service: warehouse13-postgres
  Image: {{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}
  Persistence: {{ if .Values.postgres.persistence.enabled }}Enabled ({{ .Values.postgres.persistence.size }}){{ else }}Disabled (emptyDir){{ end }}
{{- end }}

{{- if .Values.minio.enabled }}
MinIO:
  Service: warehouse13-minio
  Image: {{ .Values.minio.image.repository }}:{{ .Values.minio.image.tag }}
  Persistence: {{ if .Values.minio.persistence.enabled }}Enabled ({{ .Values.minio.persistence.size }}){{ else }}Disabled (emptyDir){{ end }}
{{- end }}

---

ACCESSING YOUR APPLICATION:

{{- if .Values.ingress.enabled }}

1. Via Ingress:
{{- range .Values.ingress.hosts }}
   https://{{ .host }}
{{- end }}

{{- else }}

1. Using Port Forwarding:

   # Application (Frontend + API)
   kubectl port-forward -n {{ .Release.Namespace }} svc/warehouse13-app 8000:8000
   Then visit:
     - Frontend: http://localhost:8000
     - API Docs: http://localhost:8000/docs
     - Health: http://localhost:8000/health

   # MinIO Console
   kubectl port-forward -n {{ .Release.Namespace }} svc/warehouse13-minio 9001:9001
   Then visit: http://localhost:9001
   Username: {{ .Values.minio.auth.rootUser }}
   Password: {{ .Values.minio.auth.rootPassword }}

2. Expose via LoadBalancer or Ingress for external access.

{{- end }}

---

CHECKING STATUS:

  # View all pods
  kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}

  # Check services
  kubectl get svc -n {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}

  # View logs
  kubectl logs -n {{ .Release.Namespace }} -l app.kubernetes.io/component=app -f

---

UPGRADING:

  helm upgrade {{ .Release.Name }} warehouse13/warehouse13 \
    --namespace {{ .Release.Namespace }}

---

UNINSTALLING:

  helm uninstall {{ .Release.Name }} --namespace {{ .Release.Namespace }}

  # Note: PVCs are retained. To delete them:
  kubectl delete pvc -n {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}

---

{{- if not .Values.ingress.enabled }}
⚠️  IMPORTANT: Ingress is disabled. Enable it for production use:
   --set ingress.enabled=true
{{- end }}

{{- if eq .Values.postgres.auth.password "password" }}
⚠️  WARNING: Using default PostgreSQL password!
   For production, set a secure password:
   --set postgres.auth.password=YOUR_SECURE_PASSWORD
{{- end }}

{{- if eq .Values.minio.auth.rootPassword "minioadmin" }}
⚠️  WARNING: Using default MinIO password!
   For production, set a secure password:
   --set minio.auth.rootPassword=YOUR_SECURE_PASSWORD
{{- end }}

---

For more information, visit:
  Documentation: https://github.com/yourusername/warehouse13
  Issues: https://github.com/yourusername/warehouse13/issues

Thank you for using Warehouse13!
