message: add POD_NAMESPACE magic.
diff: @@ -4,6 +4,25 @@ set -e
  set -x
  set -eo pipefail
  +# Locations
  +CONTAINER_SCRIPTS_DIR="/usr/share/container-scripts/mysql"
  +EXTRA_DEFAULTS_FILE="/etc/my.cnf.d/galera.cnf"
  +
  +# Check if the container runs in Kubernetes/OpenShift
  +if [ -z "$POD_NAMESPACE" ]; then
  + # Single container runs in docker
  + echo "POD_NAMESPACE not set, spin up single node"
  +else
  + # Is running in Kubernetes/OpenShift, so find all other pods
  + # belonging to the namespace
  + echo "Galera: Finding peers"
  + K8S_SVC_NAME=$(hostname -f | cut -d"." -f2)
  + echo "Using service name: ${K8S_SVC_NAME}"
  + # copy the pristine version to the one that can be edited
  + cp ${CONTAINER_SCRIPTS_DIR}/galera.cnf ${EXTRA_DEFAULTS_FILE}
  + /usr/bin/peer-finder -on-start="${CONTAINER_SCRIPTS_DIR}/configure-galera.sh" -service=${K8S_SVC_NAME}
  +fi
  +
  if [ "${1:0:1}" = '-' ]; then
  set -- mysqld "$@"
  fi
  