I want to set some proxy (http, https etc) config on my k8s container. That k8s container will run some user scripts, it may also run some sudo commands in that script.
What is the best way to pass this proxy config in my k8s container.
One approach I was trying was passing the proxy config as env variable to the container in my deployment manifest file.
Drawback: It will set only for default user and not root user. sudo commands will fail. User/container start script will need to set proxy config in the container for root user.
Any other alternative or clean way of passing env variable to all users in the container?
Another approach I am using now is env_keep and adding proxy config env variable list in env_keep and when command is executed with sudo in pod, it will take env variable of default user that I set using deployment manifest.
Is there any other alternatives ?