Assign labels to the GMA and project k8s namespaces
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 bemanaged_by=gitlab
- For namespaces created from CI pipelines labels will be
app=project_path_slug
andenv=environment_slug
Related kube api related changes were also added.
Related to #118778 (closed) Related to #14010 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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