RESTai has been deployed!

1. Get the application URL:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "restai.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.
  kubectl get --namespace {{ .Release.Namespace }} svc {{ include "restai.fullname" . }} -w
{{- else }}
  kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "restai.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }}
  echo http://127.0.0.1:{{ .Values.service.port }}
{{- end }}

2. Default admin credentials:
   Username: admin
   Password: (value of secrets.defaultPassword, default "admin")

{{ if or (not .Values.secrets.authSecret) (not .Values.secrets.fernetKey) }}
WARNING: You have not set authSecret and/or fernetKey in your values.
  For production/multi-replica deployments, these MUST be fixed values.
  Without them, each pod generates random secrets, breaking JWT validation
  and API key encryption across pods and restarts.

  Generate and set them:
    secrets:
      authSecret: "$(openssl rand -base64 48)"
      ssoSecretKey: "$(openssl rand -base64 48)"
      fernetKey: "$(python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())')"
{{- end }}
