AutoDevops: Support multiple project deployments to a shared kubernetes namespace
Created as requested from my comment in gitlab-ce#52494
"Our staging environment has its own cluster and uses a single namespace for all projects. To achieve this we set
KUBE_NAMESPACE=my-application-staging. Each project has its own helm chart deploying to the same namespace. To avoid clashing helm release names across projects we set the helm release name to
HELM_RELEASE_NAME=$CI_ENVIRONMENT_SLUG-$CI_PROJECT_ID and then truncate it (in a custom auto devops template) to conform to helm release naming rules
Production follows the same pattern as staging in its own cluster.
Ideally we wouldn't have to customize auto-devops and we'd be able to set
HELM_RELEASE_NAME in the environment like we do for
KUBE_NAMESPACE and the standard auto devops template would handle making sure the values we set are appropriate for kubernetes resources and helm release naming rules."