Updates to GitLab cluster namespace aren't reflected in cluster

Summary

If a cluster's namespace is updated after the cluster is provisioned, nothing is updated in the cluster itself. This is because our namespace updating logic only looks for projects with missing namespaces, not projects where the namespace differs from that of the cluster.

Steps to reproduce

  • Create a GKE cluster for a project, or add an existing cluster.
  • Once the cluster is provisioned, update the namespace.
  • Trigger an Auto DevOps pipeline.
  • The updated namespace is ignored, and the application is deployed to the old namespace.

Possible fixes

Update: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25586 is merged, so the offending code now lives at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/build/prerequisite/kubernetes_namespace.rb#L26

Edited Mar 25, 2019 by Tiger Watson
Assignee Loading
Time tracking Loading