{{- if or .Values.configMap (.Files.Glob "files/*") .Values.cloneFilesFromGit.enabled }}
{{- if .Values.entrypoint.file }}
The provided file {{ .Values.entrypoint.file }} is being executed. You can see the logs of each running node with:
    kubectl logs [POD_NAME]

and the list of pods:
    kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
{{- else }}
You didn't specify any entrypoint to your code.
To run it, you can either re-deploy the chart using the `mxnet.entrypoint.file` option to specify your entrypoint, or execute it manually by jumping into the pods:

1. Get the running pods
    kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"

2. Get into a pod
    kubectl exec -ti [POD_NAME] bash

3. Execute your script as you would normally do.
{{- end }}
{{- else }}
WARNING: You haven't loaded any file. You can access the Python REPL by jumping into the pods:

1. Get the running pods
    kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mxnet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"

2. Run the Python REPL
    kubectl exec -ti [POD_NAME] python3

This chart allows three different methods to load your files:

1. Load the files from an existing ConfigMap, using the `configMap` option.
2. Putting your files in a `files` folder in the root of the Chart.
3. Cloning a Git repository with the `cloneFilesFromGit` option.

Examples for the different methods can be found in the README (see https://github.com/bitnami/charts/blob/master/bitnami/mxnet/README.md).
{{- end }}

{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}

WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/

{{- end }}

{{ include "mxnet.validateValues" . }}
