feat: support task spec param get value from configmap
Changes
support task spec param get value from configmap
Part of #1744
/kind feature
API changes
adding a field valueFrom within the task.params: valueFrom
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
- [x] Has Docs included if any changes are user facing
- [x] Has Tests included if any functionality added or changed
- [x] Follows the commit message standard
- [x] Meets the Tekton contributor standards (including functionality, content, code)
- [x] Has a kind label. You can add one by adding a comment on this PR that contains
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep - [x] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
- [ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release
Release Notes
`valueFrom` can use values for the parameters which defined in `ConfigMap`
@chengjoey: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.
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.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: chengjoey (cc44696067155768cb472b45166dac2e585743a7)
Hi @chengjoey. Thanks for your PR.
I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign afrittoli after the PR has been reviewed.
You can assign the PR to them by writing /assign @afrittoli in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
#1744
/kind feature
/ok-to-test
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
/retest
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
/retest
@vdemeester can you take a look when you have time
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report
| File | Old Coverage | New Coverage | Delta |
|---|---|---|---|
| pkg/reconciler/taskrun/resources/taskspec.go | 100.0% | 72.7% | -27.3 |
| pkg/reconciler/taskrun/taskrun.go | 80.4% | 79.8% | -0.6 |
/retest
/assign @vdemeester
Naive question : do we want a TEP for this ? I would think it's fine not having it but, I'd rather ask the rest of the maintainer @tektoncd/core-maintainers 🙃
Naive question : do we want a TEP for this ? I would think it's fine not having it but, I'd rather ask the rest of the maintainer
I think so-- some points that could use more discussion:
- this affects task reusability as it ties the task definition to runtime configuration (the name of the configmap). maybe the configmap should be specified in taskrun instead.
- this affects conformance, as it's only supported for a k8s implementation of tekton
- I'm curious what the use case is here, and why a workspace bound to a configmap doesn't work for it. Can we improve workspaces in some way to meet this use case?
- syntax wise, I would imagine people would want to put all keys into the same configmap so I doubt they want to include the configmap reference for each param definition
@chengjoey: PR needs rebase.
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.