Skip to content
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

Feature: Support specifying container configuration files in Pod spec #17624

Closed
eliaslevy opened this issue Nov 22, 2015 · 2 comments
Closed

Comments

@eliaslevy
Copy link

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: v1
kind: Pod
metadata:
  name: test
spec:
  containers:
  - image: gcr.io/google_containers/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /etc/some.config
      name: config-file
  volumes:
  - name: config-file
    inlineFile:
      content: |
        foo = bar
        x = y
@mikedanese
Copy link
Member

I feel like this is a duplicate of another issue. cc @thockin because I remember he commented on that issue and might have luck finding it.

@thockin
Copy link
Member

thockin commented Nov 22, 2015

This is a dup of #13610 and overlaps a lot with ConfigData. I'm wary of having too many ways to do the same thing.

@pmorie who is shepherding ConfigData.

@thockin thockin closed this as completed Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants