CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}

{{- if and (not .Values.auth.enabled) (contains .Values.service.type "LoadBalancer") }}
-------------------------------------------------------------------------------
 WARNING

    By specifying "serviceType=LoadBalancer" and not specifying "auth.enabled=true"
    you have most likely exposed the Memcached service externally without any
    authentication mechanism.

    For security reasons, we strongly suggest that you switch to "ClusterIP" or
    "NodePort". As alternative, you can also specify valid credentials using the
    "auth.username" and "auth.password" parameters.

-------------------------------------------------------------------------------
{{- end }}

** Please be patient while the chart is being deployed **

Memcached can be accessed via port {{ .Values.service.ports.memcached }} on the following DNS name from within your cluster:

    {{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}

{{- if eq .Values.architecture "high-availability" }}

Please see https://github.com/memcached/memcached/wiki/ConfiguringClient to understand the Memcached model and need for client-based consistent hashing.
You might also want to consider more advanced routing/replication approaches with mcrouter: https://github.com/facebook/mcrouter/wiki/Replicated-pools-setup

{{- end }}

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

To access the Memcached Prometheus metrics from outside the cluster execute the following commands:

    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ .Values.metrics.service.ports.metrics }}:{{ .Values.metrics.service.ports.metrics }} &
    curl http://127.0.0.1:{{ .Values.metrics.service.ports.metrics }}/metrics

{{- end }}

{{- include "memcached.validateValues" . }}
{{- include "memcached.checkRollingTags" . }}
{{- include "common.warnings.resources" (dict "sections" (list "metrics" "" "volumePermissions") "context" $) }}
