1. Get the application URL by running these commands:
{{- if .Values.frontend.ingress.enabled }}
{{- range $host := .Values.frontend.ingress.hosts }}
  {{- range .paths }}
  Frontend: http{{ if $.Values.frontend.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
  {{- end }}
{{- end }}
{{- end }}

{{- if .Values.backend.ingress.enabled }}
{{- range $host := .Values.backend.ingress.hosts }}
  {{- range .paths }}
  Backend API: http{{ if $.Values.backend.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
  {{- end }}
{{- end }}
{{- end }}

2. Database Connection:
   Host: {{ include "brand-master.fullname" . }}-db
   Port: {{ .Values.postgres.port }}
   Database: {{ .Values.postgres.database }}
   User: {{ .Values.postgres.user }}

3. Product Images Storage:
   {{- if .Values.backend.persistence.enabled }}
   PVC: {{ include "brand-master.fullname" . }}-uploads-pvc
   Size: {{ .Values.backend.persistence.size }}
   Mount Path: {{ .Values.backend.persistence.mountPath }}
   {{- else }}
   Warning: Persistence is disabled. Product images will be lost on pod restart!
   {{- end }}

4. IMPORTANT Security Notes:
   - Change the JWT secret key in values.yaml before deploying to production
   - Update the database password in values.yaml
   - Configure your domain names in the ingress sections
   - Ensure cert-manager is installed for TLS certificates

5. To access the application locally without ingress:
   kubectl port-forward svc/{{ include "brand-master.fullname" . }}-frontend 8080:80
   kubectl port-forward svc/{{ include "brand-master.fullname" . }}-backend 8000:8000

6. To check pod status:
   kubectl get pods -l app.kubernetes.io/instance={{ .Release.Name }}

7. To view logs:
   kubectl logs -l app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=backend
   kubectl logs -l app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=frontend
