Skip to content

Assign labels to the GMA and project k8s namespaces

Arthur Evstifeev requested to merge namespace-labels into master

What does this MR do?

As described in #118778 (closed) namespaces created by the gitlab don't have labels on them. Lack of labels makes it hard to put predictable network policies for auto deploy applications.

This MR will add labels in 2 places:

  • For gitlab-managed-apps namespace label will be managed_by=gitlab
  • For namespaces created from CI pipelines labels will be app=project_path_slug and env=environment_slug

Related kube api related changes were also added.

Related to #118778 (closed) Related to #14010 (closed)

Screenshot_20200115_143511

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Thong Kuah

Merge request reports