How to refer to an existing ConfigMap in K8 via autodevops
Hello,
This might not be an issue as is - but since I am not able to find a way I am opening this issue here to see if there is a possibility;
Requirement: I deploy a microservice in a K8 cluster via gitlab autodevops feature and my .gitlab-ci.yml file is minimal; I have a DockerFile that autodevops calls and builds the docker image and pushes the image to project-specific container registry;
Another process that creates K8 cluster creates a namespace and a configmap components in the cluster; My microservice needs to refer to these ConfigMap entries as environment variables.
Question:
-
How can I refer to the existing K8 ConfigMap as environment variables via autodevops without providing custom helm chart? This is pretty easy to do if I provide my custom yaml files and do it via kubectl; I am hoping I don't have to provide custom helm charts to do this.
-
Also how can my service that is being created by autodevops refer to the pre-existing namespace? is there an entry in values.yaml that I can provide which will force the namespace for this service to be same?
-
Is there a way to provide a service name in values.yaml instead of generating a service name?
Thanks!