-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use env variable for docker image entry point config #699
base: master
Are you sure you want to change the base?
Conversation
Hi, I don't understand what this change is trying to do. Have you tried the example kubernetes config in examples/kubernetes.yml ? |
@mostynb Yes I did. The error message comes from a modified version of
I'm getting the error as described above. |
So what I'm trying to do is to allow me and future users to customize the data directory ( |
@mostynb Did my explaination make sense to you, or do I need to explain anything in more detail? |
Just saw this and this is the same issue that I raised here : #736., there are a bunch of ways to do, we can also hard code the dir value and http_address value in golang code, but hard code the value in container runtime will ignore the value setting in k8s file, because for the code here : https://github.com/buchgr/bazel-remote/blob/master/config/config.go#L502-L505, it will pull the http_address value directly from the entry point instead of read the value set via BAZEL_REMOTE_HTTP_ADDRESS since the env variable values are just a default used for fall back. |
Yes. In my use case it is exactly the same. I would like to be able to override the |
@mostynb , any update on this ? it's using urfave cli v2 library code, based on the precedence order : https://github.com/urfave/cli/blob/main/docs/v2/examples/flags.md#precedence for the value set from entry point from here : it will be considered as the command line flag value from user, hence, it won't take the ENV var value set from here : because they are considered as the env values, which has a lower precedence compared to entry_point value. Hence, the kubernetes.yml example for setting bazel_remote_max_size and dir config never works. |
With current setting, it would be hard to modify the dir and http_address with k8s deployment.
I was supposing
in k8s yaml should do the work but I'm getting
And the way bazel is making the image, it is hard to debug what was happening :(