-
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
Handling parameter interpolation in fields not designed for it #1530
Comments
Two approaches...
|
I'm looking at -- https://github.com/kubernetes-sigs/kustomize/blob/master/docs/plugins/builtins.md#field-name-patchesStrategicMerge -- to see if it might be an applicable approach. One difference is that the patch would always be inlined (and parameterized) instead of in a separate file. But the basic idea is to provide Also see... https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/devel/api-conventions.md#patch-operations ... as that's the intent to some degree ... e.g. to "patch" the Task/Pipeline |
So... to construct an example...
Could be written as...
or with params as...
Going back to the volume case in #1514 the Task could be re-written "safely" by appending a
|
In #1393 we've been looking at adding support for types other than strings to params. We'll hit a similar problem if we put a value like |
More thoughts on using a flexible parameterized type... When we unmarshal Tasks and Pipeline we do so directly into the target types we need at "run" time. For example each Step in a Task is unmarshaled directly into a corev1.Container. I'd propose we instead unmarshal into a more flexible intermediary "template" or "parameterized" type that would let us support the above parameterization cases. To offer the same validation and type guarantees, after unmarshaling into the intermediary type we would perform a The TaskRun/PipelineRun "reconciler" logic would be much the same, but use the |
This is more or less what we did for the support of |
Excellent thanks for the reference... |
I see this is part of Pipelines1.0/beta milestone. Is that still the case @skaegi ? |
I think it should be, at least for 1.0 (so after the beta api but before calling tekton ga) |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. 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. |
/remove-lifecycle rotten |
@vdemeester: Reopened this issue. 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. |
Ping :) Any way to move this forward? Or is this a won't-fix? I hope it is not as especially task resource constraints (also as noted in #4080) are really crucial to have reusable tasks. |
/reopen |
@vdemeester: Reopened this issue. 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. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
I think this issue is super important. Without it, tasks that build applications cannot be reused very well because the resource consumption (memory) cannot be known by the task author. |
/remove-lifecycle stale |
/assign |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
I see tektoncd/community#560 was merged. Now I'm trying to make it work.
Trying to create this, I get the following error:
Am I doing it wrong? Checking other issues in this repository, I found the following #4653 |
Hi @faust64, have you tried enabling alpha features? I'll update the error message to be more clear that this is what is needed. |
Indeed, I was missing this. |
Great, thanks! Error message is updated in #5045 |
Our resource requirements api has been addressed in a few TEPs, and I think this issue doesn't have other clear use cases right now, so I'm going to close it. If there are specific fields of Tasks that do need parameterization but don't support it, we should open issues specifically for those. |
When authoring Tekton resources that use parameter interpolation we can get in trouble when either the value type is not a
string
or if there is additional validation like for #1514 . For now I'm just pointing out the problem but it would be good if we could somehow defer validation in Tasks and Pipelines until after parameter substitution occurred.The text was updated successfully, but these errors were encountered: