{{- if not (eq $.Values.database.backend "MySql") }}
DEPRECTATED: As of metaplay-gameserver chart version 0.2.0 .Values.database.backend only supports value "MySql" currently. {{ $.Values.database.backend }} is an unsupported value.
{{- end }}
{{- if eq (get ($.Values.experimental.legacyAuth | default dict) "enabled" | default false) true }}
DEPRECATED: Legacy Auth0 configuration are deprecated starting metaplay-gameserver chart version 0.4.5. Please deactivate the .experimental.legacyAuth.enabled switch from your Helm values! If you are running a pre-R19 Metaplay game server, please use chart version 0.4.4 or earlier with the legacyAuth set.
{{- end }}
{{- if ne $.Values.service.tls.enabled true }}
WARNING: You are running the game server endpoint without TLS. You can enable TLS via .Values.services.tls.enabled.
{{- end }}
{{- if and $.Values.admin.enabled (ne $.Values.admin.tls.enabled true) }}
WARNING: You are running the game server LiveOps admin dashboard without TLS. You can enable TLS via .Values.admin.tls.enabled.
{{- end }}
{{- if and (eq $.Values.infraMigration false) (eq (include "metaplay.infraMigrationConfigMapExists" $) "1") }}
WARNING: The ConfigMap 'metaplay-infra-migration' exists in your namespace, but .Values.infraMigration is set to false.
Some resources have NOT been provisioned by this Helm chart because they are now managed by the infrastructure/platform instead.
Please review your infrastructure setup to ensure all required resources are available.
{{- end }}
{{- if and $.Values.grafana.enabled (include "metaplay.infraMigrationEnabled" $ | int) }}
WARNING: You have 'grafana.enabled' set in your Helm values but the infrastructure is also providing a Grafana instance.
Please consider setting 'grafana.enabled' to 'false' in your Helm values to avoid running duplicate Grafana instances.
{{- end }}

Installed {{ $.Release.Name }}

Release:
  Release name:      {{ $.Release.Name }}
  Release namespace: {{ $.Release.Namespace }}
  Chart name:        {{ $.Chart.Name }}
  Chart version:     {{ $.Chart.Version }}
Game server:
  Image: {{ include "gameserver-repo" $ }}:{{ $.Values.image.tag }}
Endpoints:
  Server:       tcp://{{ include "gameserver-fqdn" $ }}:[{{ include "gameserver-service-ports" $ }}]
{{- if $.Values.experimental.websockets.enabled }}
  Server (websocket): ws://{{ include "gameserver-fqdn" $ }}:[{{ include "gameserver-websocket-service-ports" $}}]
{{- end }}
{{- if and (eq $.Values.service.loadbalancerType "nlb") ($.Values.service.ipv6Enabled) (ne (include "gameserver-fqdn" $) "") }}
  Server IPv6:  tcp://{{ include "gameserver-hostname" $ }}-ipv6.{{ include "gameserver-domain" $ }}:[{{ include "gameserver-service-ports" $ }}]
{{- if $.Values.experimental.websockets.enabled }}
  Server IPv6 (websocket): ws://{{ include "gameserver-hostname" $ }}-ipv6.{{ include "gameserver-domain" $ }}:[{{ include "gameserver-websocket-service-ports" $}}]
{{- end }}
{{- end }}
  TLS enabled:  {{ $.Values.service.tls.enabled }}
  CDN base:     https://{{ include "gameserver-cdn-fqdn" $ }}/
{{- if $.Values.publicWebApi.enabled }}
  PublicWebApi: https://{{ include "gameserver-public-web-api-fqdn" $ }}/
{{- end }}
{{- if $.Values.admin.enabled }}
  Admin:        https://{{ include "gameserver-admin-fqdn" $ }}/
{{- end }}
{{- if $.Values.grafana.enabled }}
  Grafana:      https://{{ include "gameserver-admin-fqdn" $ }}/grafana/
{{- end }}

Shards{{ if $.Values.dedicatedShardNodes }} (dedicated shard nodes){{ end }}:
{{ $.Values.shards | toYaml }}

You can test that your deployment has succeeded by running Helm tests:

helm test --namespace {{ $.Release.Namespace }} {{ $.Release.Name }}

{{- if gt (len $.Values.shards) 0 }}
You can stream the live logs from shards using kubectl, e.g.:

kubectl logs --namespace {{ $.Release.Namespace }} -f {{ index $.Values.shards 0 "name" | default "all" }}-0
{{- end }}
