-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add the ability to pipe env/properties files content to a configmap #1394
Labels
Comments
zen-dog
added a commit
that referenced
this issue
Apr 27, 2020
Summary: When creating `ConfigMap`s or `Secret`s k8s allows for taking an env-file using the `--from-env-file` option. Env-files contain a list of environment variables. These syntax rules apply: - Each line in an env file has to be in VAR=VAL format. - Lines beginning with # (i.e. comments) are ignored. - Blank lines are ignored. - There is no special handling of quotation marks (i.e. they will be part of the ConfigMap value)) New pipe-task `fnvFile` field can be used instead of `file` to signal that the pipe-file should be treated as an env-file: ```yaml spec: pipe: - envFile: /tmp/foo.env kind: ConfigMap key: foo ``` Note, that **either** `file` or `envFile` can be used but not both. For more information on env-files see [k8s documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-files) Fixes: #1394 Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
zen-dog
pushed a commit
that referenced
this issue
Apr 29, 2020
Summary: When creating `ConfigMap`s or `Secret`s k8s allows for taking an env-file using the `--from-env-file` option. Env-files contain a list of environment variables. These syntax rules apply: - Each line in an env file has to be in VAR=VAL format. - Lines beginning with # (i.e. comments) are ignored. - Blank lines are ignored. - There is no special handling of quotation marks (i.e. they will be part of the ConfigMap value)) New pipe-task `fnvFile` field can be used instead of `file` to signal that the pipe-file should be treated as an env-file: ```yaml spec: pipe: - envFile: /tmp/foo.env kind: ConfigMap key: foo ``` Note, that **either** `file` or `envFile` can be used but not both. For more information on env-files see [k8s documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-files) Fixes: #1394 Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What would you like to be added:
Right now a file from a Pipe is always written as a file to a
ConfigMap
and e.g. its an env file, I can't mount the variables as env vars inside another container. Adding a flag or separatePipeEnv
task would make sense to me.Why is this needed:
One of my pipe tasks creates a
.env
file which I have to mount as env vars into another container in another task. Right now I am mounting theConfigMap
from the pipe into an intermediarykubectl
container which creates a newConfigMap
containing the env vars as separate variables.kubectl
wise the current behaviours is likekubectl create configmap xyz --from-file
vskubectl create configmap xyz --from-env-file
The text was updated successfully, but these errors were encountered: