Instance-level kubernetes can't override namespace?
Problem to solve
When using instance-level kubernetes integration, there is only 1 location to (optionally) set a namespace or let gitlab create the namespace with project-id.
This is not always wanted or useable.
Intended users
- Rancher2-Users
- Sysadmin
- Developer
Further details
E.g. in our company as admin we define the clusters/environment to deploy to including the credentials. This works fine via instance-level configuration! We've been using $CI_PROJECT_PATH_SLUG as namespace-names. They should be as unique and gives the user a direct way to find related repositories, docker-images, monitoring etc. Other circumstances might prevent using the gitlab schema. In a Rancher2-Cluster namespaces are assigned to projects with sometimes specific PodSecurityPolicies. These Namespaces need to be assigned before anything can be deployed into them.
Yes for deployments this can be overriden with environment specific variables, but that breaks the metrics/monitoring.
Proposal
It might be useful to:
- provide alternative naming schemes
- be able to use $CI_* variables in there (probably not really safe)
- be able override the namespace from within projects?
regards, Roman