-
Notifications
You must be signed in to change notification settings - Fork 422
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 CEL macro to fetch data from ConfigMap #1573
Comments
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. |
Rotten issues close after 30d of inactivity. /close 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 |
/reopen |
@khrm: 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. |
I'd also really be interested in such a feature. I've got a use-case similar to: tektoncd/pipeline#4080 (comment) Basically, I have a single building pipeline for multiple different projects. I'd like the resource limits to be unique (optimized) for each project, which is only possible in a PipelineRun. As tekton-triggers, currently, have no way of fetching content outside of the webhook request to enrich the content of the Trigger. This greatly limits the usefulness of Triggers. As, I'm using github webhooks - my only option is adding a bunch of github labels (which is noisy). If it were possible to fetch content from a ConfigMap, I could simply choose the correct configmap (based on the git-repo name or some other meta data). |
Feature request
The
cel
interceptor already offers extension functions to compare data from an event's body or headers to a Kubernetes Secret withcompareSecret()
, which can look like this:or, including the namespace of the Secret:
"Reading" from Secrets (for comparison) is a great feature, but there's no way for CEL to read a value from a ConfigMap. My initial thought was to add an extension function for
compareConfigMap()
or something like that, but I think it'd be better to just allow fetching from ConfigMaps with a function/macro. Maybe it could look like this:or, more realistically:
There is probably a better name for that macro, but that's the gist.
Use case
I can think of several, but probably there are way more:
The text was updated successfully, but these errors were encountered: