You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you can parametrize a container via environment variables passed in the Pod spec. Some applications expect their configuration in the form of config files. The gap can be bridged by a helper script in the container that reads the config from an environment variable and writes it to a file before executing the app, but this is somewhat hackish for large configs. While Linux support very large environment variables, it would be more natural to pass the config to the container via a file, as the app expects.
I propose a new mechanism that would allow you to specify a config file within the spec and have the file mounted at the specified location within the container. This would work similar to a hostPath volume, but it would not require that the file pre-exist in the node the Pod executes in, and would delete the file once the Pod no longer runs.
Maybe something like:
apiVersion: v1kind: Podmetadata:
name: testspec:
containers:
- image: gcr.io/google_containers/test-webservername: test-containervolumeMounts:
- mountPath: /etc/some.configname: config-filevolumes:
- name: config-fileinlineFile:
content: | foo = bar x = y
The text was updated successfully, but these errors were encountered:
Currently you can parametrize a container via environment variables passed in the Pod spec. Some applications expect their configuration in the form of config files. The gap can be bridged by a helper script in the container that reads the config from an environment variable and writes it to a file before executing the app, but this is somewhat hackish for large configs. While Linux support very large environment variables, it would be more natural to pass the config to the container via a file, as the app expects.
I propose a new mechanism that would allow you to specify a config file within the spec and have the file mounted at the specified location within the container. This would work similar to a hostPath volume, but it would not require that the file pre-exist in the node the Pod executes in, and would delete the file once the Pod no longer runs.
Maybe something like:
The text was updated successfully, but these errors were encountered: