As seen here pass in the deployed to namespace as an environment variable to all deployed apps in this repo.
There is a discuession to be had around if we should be using an environment variable via the deployment code or we should be reading the file /var/run/secrets/kubernetes.io/serviceaccount/namespace which k8s mounts into all the pods deployed. Reading from a file is def slower but if we can read it once on boot and then we should be good.
As seen here pass in the deployed to namespace as an environment variable to all deployed apps in this repo.
There is a discuession to be had around if we should be using an environment variable via the deployment code or we should be reading the file
/var/run/secrets/kubernetes.io/serviceaccount/namespacewhich k8s mounts into all the pods deployed. Reading from a file is def slower but if we can read it once on boot and then we should be good.