Provide separate namespaces for each project environment
What does this MR do?
Includes (and depends on) https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30551
Kubernetes deployments on new clusters will now have a separate namespace per project environment, instead of sharing a single namespace for the project. Namespaces are of the form
Behaviour of existing clusters is unchanged.
All new functionality is controlled by the
:kubernetes_namespace_per_environment feature flag, which is safe to enable/disable at any time.
- Currently the feature flag defaults to disabled. Do we want it enabled by default instead? edit: Updated to be enabled by default.
Couple of extra notes:
- Due to https://gitlab.com/gitlab-org/gitlab-ce/issues/64295#note_191147424 the behaviour desired in https://gitlab.com/gitlab-org/gitlab-ce/issues/52494#note_175968978 will not work yet - if an environment is renamed it will likely cause a deployment to a new namespace instead of re-using the old one.
- Also due to https://gitlab.com/gitlab-org/gitlab-ce/issues/64295#note_191147424, I've held off on implementing the suggestion in https://gitlab.com/gitlab-org/gitlab-ce/issues/52494#note_186875654, as this could be affected by the solution to https://gitlab.com/gitlab-org/gitlab-ce/issues/64295
- QA notes/screenshots
Does this MR meet the acceptance criteria?
- Changelog entry
- Documentation created/updated or follow-up review issue created
- Code review guidelines
- Merge request performance guidelines
- Style guides
- Database guides
- [-] Separation of EE specific content
Performance 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
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
- [-] 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