-
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
Pipelinerun should be able to read from Secret and Configmap #8347
Comments
@pombaer Thanks for this feature request. Generally speaking, I would say that setting up the Another way to achieve this with existing Tekton features is to mount your That said, I think it's reasonable to consider pulling parameters from a I would be more hesitant about supporting secrets though: secrets should never be passed as parameters as that would be a security problem. We could include the secret namespace and name in the provenance, instead of the secret itself, to avoid exposing the secret, and than it would be up to the user to make sure they only include actual secrets in there, and not other configuration values that would become hidden and impoverish the provenance. If this was implemented, it would require support in the CLI and dashboard, too. Is this something you'd be interested in contributing? @tektoncd/core-maintainers wdyt? |
You are right, Secrets could be a security issue since at least in Openshift they are visible as parameters in the WebUI, i did not thought about that, since i only needed an uncitical Value (hostname) and the value is part of the Secret which also holds Username and Password, but they are injected by the annotation "tekton.dev/docker-0: ". I did a lot of research before posting and thind there is need for such a feature, for simpler inplementation it may is enough to make a hint in documentation of the security considerations. I am sorry, but i cannot do contributing of the feature since i am not a developer, i am a Systems Engineer wich very basic coding skills, i do not think that you would be happy with my code ;) But one more question, you wrote "If you are using Tekton triggers you could use a TriggerBinding to inject any configuration into", i did some research again but found no hints how to use secrets/configmaps in TriggerBinding, i only can use the payload from my Webhook and in my case some "overlays" from the "cel" interceptor, but that would not help me, do you have an working example for me? |
Thank you for taking the time to research and create this feature request!
I will mark this as "help-wanted" then. Maybe there are developers within your company who might be interested in contributing to this?
You are right, you cannot use secrets or configmaps directly, what I meant is that your trigger bindings can basically act as configmaps since you can provide fixed values within for the parameters you want to inject. See this example - depending on filters in the trigger a different binding will be used and different inputs will be passed to the underlying pipeline run - and the actual values are defined in the bindings directly. |
I want to reopen the following Feature Request:
#2688
Feature request
We are using a current version of Openshift/Tekton
Openshift/Kubernetes:
Client Version: 4.16.13
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: 4.16.13
Kubernetes Version: v1.29.8+f10c92d
Openshift Version: 4.16.13
Tekton:
Client version: 0.37.0
Chains version: v0.22.2
Pipeline version: v0.62.3
Triggers version: v0.29.1
Operator version: v0.73.1
Openshift Operator: 1.16.0
I'am looking for a feature to read Pipelinerun Parameters from a Configmap and Secret. I know it is possible within a task to read Settings from Secrets and Configmaps into a Environment Variable, but this is no option when using Openshift ClusterTasks.
Use case
In my Case i am using "buildah" ClusterTask which expects the Variable "IMAGE" for the image to build, since i am using an external Image Registry the Name must include the Hostname in order the image can be pushed, so it should be in a dynamic form.
Example Pipeline:
I need a "Variable" that represents my ":" value. I can use some workarrounds like Including the Servername in the Webhook Payload, create a previous tasks that reads the Secret/Configmap Value and set's a Task Result Variable which can be used in buildah value Parameter, but all of them are not satisfying.
I am not sure where would be the right place to read the Secret/Configmap value, for me it would be ok if i could do it in the Pipelinerun definition like:
The text was updated successfully, but these errors were encountered: