-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 support for secret and configMap valueFrom and envFrom fields in … #982
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
imo in the long run we should support templating in all container spec fields in both steps and the container template (#811 (comment)) but I don't mind making an incremental step toward that :)
could you also add to https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#templating that these values can be templated? 😇
other than that lgtm :D
…templating Currently, we support template on the environment variables key, *but* not if the environment variable comes from a `ConfigMap` or a `Secret`. The following won't work. ``` env: - name: GOPATH value: /workspace - name: GITHUB_TOKEN valueFrom: secretKeyRef: name: ${inputs.params.github-token-secret} key: bot-token ``` This fixes that and add support for using variable interpolation on `valueFrom.secretKeyRef` and `valueFrom.configMapKeyRef`. This also adds variable interpolation on `envFrom`. Signed-off-by: Vincent Demeester <[email protected]>
faf8de2
to
6a4ff33
Compare
SGTM |
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.
/lgtm
/meow space
secretKeyRef: | ||
name: ${inputs.params.github-token-secret} | ||
key: bot-token | ||
``` |
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.
🎉
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
hm, that's new! |
/test pull-tekton-pipeline-integration-tests |
Changes
…templating
Currently, we support template on the environment variables key, but
not if the environment variable comes from a
ConfigMap
or aSecret
.The following won't work.
This fixes that and add support for using variable interpolation on
valueFrom.secretKeyRef
andvalueFrom.configMapKeyRef
.This also adds variable interpolation on
envFrom
.This would fix this 👼
/cc @bobcatfish
Signed-off-by: Vincent Demeester [email protected]
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.
Release Notes