-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
play kube does not expand env in command #15983
Comments
Are you sure your YAML file was correct. I did the following and it worked correctly for me.
|
Can you elaborate on that? I am not sure whether you think Podman behaves correctly or not. |
codedocs link: https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/ |
I just copied the yaml from @zhangguanzhang 's link and this is what I get:
meanwhile, this is the expected output according to the docs:
(note: PROTOCOL is supposed to be unexpanded due to the ordering of the env, but things like SERVICE_IP should be expanded and are not). |
Can I try this? |
Sure, thanks @jakecorrenti ! |
I think the issue is the parser we are using to translate kube.yaml is not supporting that mechanism for passing environment variables. |
We end up with the value but not the name. |
Any update on this @jakecorrenti? I'd be happy to help if needed. |
@reavessm you can snag it. I haven't been making much progress, unfortunately. |
@reavessm you got it. |
A friendly reminder that this issue had no activity for 30 days. |
@reavessm Any progress? |
A friendly reminder that this issue had no activity for 30 days. |
@haircommander Can you confirm this? |
So this is interesting from a Docker/Podman perspective
|
Shall i take a look on this one? |
@hasan4791 It is yours. |
Hi @rhatdan , this issue has no recent update. Can I try to work on it? |
Sure hopefully you can get it done. |
…h format $(ENV) Fixes: containers#15983 Signed-off-by: Chee Hau Lim <ch33hau@gmail.com>
@ch33hau Any update? |
@jakecorrenti Is this something you could look at again? |
Sure thing. I won't be able to get around to it until next week if that's ok |
This issue is almost a year old, a week won't matter. :^) |
/assign |
Kubernetes supports expanding $(FOOBAR) as environment variables within the kube.YAML. When using podman kube play, we need to do the same, for supporting these YAML files. Fixes: containers#15983 Signed-off-by: Chee Hau Lim <ch33hau@gmail.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Variables defined in the
env
section are not expanded in thecommand
/args
section. According to the k8s spec, env vars should be expanded using the$(VAR_NAME)
syntax.Steps to reproduce the issue:
test.yaml
with the following contents:podman play kube test.yaml && podman logs -f echo-test
Describe the results you received:
no output
Describe the results you expected:
"BAR" to be printed
Additional information you deem important (e.g. issue happens only occasionally):
I also tried printing
$(PATH)
instead of$(FOO)
and there was still no output.Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (/~https://github.com/containers/podman/blob/main/troubleshooting.md)
I have not tested with latest but I have read the troubleshooting guide.
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical F36 Workstation
The text was updated successfully, but these errors were encountered: