-
Notifications
You must be signed in to change notification settings - Fork 899
chore: add envbox documentation #7198
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm fine having it in examples :)
```yaml | ||
# An example of referencing a secret in an environment variable. | ||
kind: Pod | ||
spec: | ||
containers: | ||
- name: envbox | ||
env: | ||
- name: CODER_IMAGE_PULL_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: <name> | ||
key: .dockerconfigjson | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to show this in Terraform instead of YAML since 99% of people on this doc will be looking to add this to their envbox template in Coder. Or show both 🤷🏼
env {
name = "CODER_IMAGE_PULL_SECRET"
value_from {
secret_key_ref {
name = "<name>"
key = ".dockerconfigjson"
}
}
}
examples/templates/envbox/main.tf
Outdated
node_selector = { | ||
sreya-test = true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this too!
| `CODER_AGENT_TOKEN` | The [Coder Agent](https://coder.com/docs/v2/latest/about/architecture#agents) token to pass to the inner container. | True | | ||
| `CODER_INNER_ENVS` | The environment variables to pass to the inner container. A wildcard can be used to match a prefix. Ex: `CODER_INNER_ENVS=KUBERNETES_*,MY_ENV,MY_OTHER_ENV` | false | | ||
| `CODER_INNER_HOSTNAME` | The hostname to use for the inner container. | false | | ||
| `CODER_IMAGE_PULL_SECRET` | The docker credentials to use when pulling the inner container. The recommended way to do this is to create an [Image Pull Secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#registry-secret-existing-credentials) and then reference the secret using an [environment variable](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data). | false | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I totally missed this part 🤦🏼
If you want to remove this from the docker in docker docs in favor of this, that's fine.
fixes #6789
Unsure whether we should be adding the template to the repo at this point or not. We can keep it in envbox if we want. I figured we could keep it in
examples/
but not add it totemplates init
until we feel comfortable offering it as a starter template.