# If you encounter "SSL certification error (subject name does not match the host name)", you may try to set DOCKER_VERNEMQ_KUBERNETES_INSECURE to "1".
# Cluster discovery implementation based on https://github.com/thesandlord/kubernetes-pod-ip-finder
insecure=""
if env | grep-q"KUBE_VERNEMQ_DISCOVERY_URL";then
if env | grep-q"DOCKER_VERNEMQ_KUBERNETES_INSECURE";then
echo"Will join an existing Kubernetes cluster with discovery node at ${kube_pod_name}.${VERNEMQ_KUBERNETES_SUBDOMAIN}.${DOCKER_VERNEMQ_KUBERNETES_NAMESPACE}.svc.cluster.local"