Skip to content

Conversation

@rpajay
Copy link

@rpajay rpajay commented Oct 31, 2022

No description provided.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 31, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 31, 2022
@rpajay rpajay changed the title Create 0125-configmaps-and-secrets-as-param-value-source.md TEP-0125:-configmaps-and-secrets-as-param-value-source.md Oct 31, 2022
@rpajay rpajay changed the title TEP-0125:-configmaps-and-secrets-as-param-value-source.md TEP-0125: Configmap and Secret as Param Value Source Oct 31, 2022
@jerop
Copy link
Member

jerop commented Nov 7, 2022

/kind tep

@tekton-robot tekton-robot added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Nov 7, 2022
@dibyom
Copy link
Member

dibyom commented Nov 7, 2022

/assign @afrittoli
/assign @pxp928

@tekton-robot
Copy link
Contributor

@dibyom: GitHub didn't allow me to assign the following users: pxp928.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @afrittoli
/assign @pxp928

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.

Comment on lines 124 to 129
type Param struct {
Name string `json:"name"`
Value ArrayOrString `json:"value"`
// Additional field ValueFrom to fetch value from ConfigMap or Secret
ValueFrom *ValueSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what a Param looks like today - it changed with array params and object params:

type Param struct {
	Name  string     `json:"name"`
	Value ParamValue `json:"value"`
}

(...)

type ParamValue struct {
	Type      ParamType `json:"type"` // Represents the stored type of ParamValues.
	StringVal string    `json:"stringVal"`
	// +listType=atomic
	ArrayVal  []string          `json:"arrayVal"`
	ObjectVal map[string]string `json:"objectVal"`
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Param struct is of PipelineRun / TaskRun
not Pipeline / Task

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in Task and Pipeline we use ParamSpec, in TaskRun and PipelineRun we use Param

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target of this TEP to specify the value from config maps and secrets directly in TaskRun / PipelineRun not in Task / Pipeline

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed, the TEP is about TaskRun and PipelineRun.

If you look at the specification of a PipelineRun, you can it uses a type called Param, which has a name and a ParamValue

The code in your example specifies ArrayOrString for the type of value, but that is not true anymore, value is now of type ParamValue.

type  Param  struct {
  Name string  `json:"name"`
  Value ArrayOrString `json:"value"`
  // Additional field ValueFrom to fetch value from ConfigMap or Secret
  ValueFrom *ValueSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
}

It would be good to define the behaviour for parameters of type array and object

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your proposal! - see my comments inline.

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from afrittoli after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details 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

@jerop
Copy link
Member

jerop commented Nov 14, 2022

/assign

@afrittoli
Copy link
Member

/test pull-community-teps-lint

@tekton-robot
Copy link
Contributor

@afrittoli: No presubmit jobs available for tektoncd/community@main

Details

In response to this:

/test pull-community-teps-lint

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.

@afrittoli
Copy link
Member

@rpajay thank you for the updates! There are still some open comments, let me know what you think or if there is anything I can do to help clarify them.

@tekton-robot
Copy link
Contributor

The following Tekton test failed:

Test name Commit Details Required Rerun command
pull-community-teps-lint 01ad9f9 link true /test pull-community-teps-lint

@pritidesai
Copy link
Member

API WG - @rpajay please take a look for another round of reviews, thanks!

Comment on lines +145 to +149
- name: FROM_SECRET
valueFrom:
secretKeyRef:
name: pipeline-run-secret
key: HELLO_WORLD_KEY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

param values are stored in cleartext as part of the CRD. Maybe I'm missing something but does this include plans for scrubbing param values that come from secrets?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point @lbernick. If a PipelineRun parameter is passed down to a TaskRun, it could use the same valueFrom syntax, but only when passed alone (i.e. not concatenated to other strings). The TaskRun controller again could use the same syntax for pods, but that would mean that the secret value could only be available to steps as an environment variable. Using secrets with environment variables can be already done today thanks to https://github.com/tektoncd/community/blob/main/teps/0101-env-in-pod-template.md

@pritidesai
Copy link
Member

API WG - under review - @rpajay please respond back if possible, appreciate it! Thanks!

@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 14, 2023
@pritidesai
Copy link
Member

API WG - @rpajay do we want to keep this proposal open? Do you need any help?

@tekton-robot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 14, 2023
@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closed this PR.

Details

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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.

mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Mar 7, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Mar 7, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Mar 7, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Jul 9, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Jul 25, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
mostafaCamel added a commit to mostafaCamel/community that referenced this pull request Oct 12, 2025
This proposal is to be able to reference `ConfigMap` as a value source for a `Param` in `TaskRun` or `PipelineRun` .
This is to support Kubernetes native options (ConfigMap) as value source along with direct value passed to `TaskRun` and `PipelineRun`.

Note: this proposal is basically picking up upon the closed (unmerged) [proposal](tektoncd#868).

Signed-off-by: Mostafa Abdelwahab <moustapha.hicham@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: UnAssigned

Development

Successfully merging this pull request may close these issues.

7 participants