pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

feat: support task spec param get value from configmap

Open chengjoey opened this issue 3 years ago • 21 comments

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 avatar Aug 24 '22 06:08 chengjoey

@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.

tekton-robot avatar Aug 24 '22 06:08 tekton-robot

CLA Signed

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.

tekton-robot avatar Aug 24 '22 06:08 tekton-robot

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

tekton-robot avatar Aug 24 '22 06:08 tekton-robot

#1744

chengjoey avatar Aug 24 '22 06:08 chengjoey

/kind feature

chengjoey avatar Aug 24 '22 06:08 chengjoey

/ok-to-test

abayer avatar Aug 24 '22 14:08 abayer

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

tekton-robot avatar Aug 24 '22 14:08 tekton-robot

/retest

chengjoey avatar Aug 24 '22 15:08 chengjoey

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

tekton-robot avatar Aug 24 '22 15:08 tekton-robot

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

tekton-robot avatar Aug 26 '22 07:08 tekton-robot

/retest

chengjoey avatar Aug 26 '22 07:08 chengjoey

@vdemeester can you take a look when you have time

chengjoey avatar Aug 26 '22 09:08 chengjoey

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

tekton-robot avatar Aug 27 '22 04:08 tekton-robot

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

tekton-robot avatar Aug 27 '22 07:08 tekton-robot

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

tekton-robot avatar Aug 27 '22 08:08 tekton-robot

/retest

chengjoey avatar Aug 27 '22 08:08 chengjoey

/assign @vdemeester

chengjoey avatar Sep 02 '22 07:09 chengjoey

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 🙃

vdemeester avatar Sep 02 '22 13:09 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

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

lbernick avatar Sep 02 '22 14:09 lbernick

@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.

tekton-robot avatar Sep 08 '22 20:09 tekton-robot