-
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
Unable to use parameters for setting runAsUser and runAsGroup in securityContext #7201
Comments
As of today, there is no workaround to make We however need to fix that as this is a valid use case and seems to come up more and more. This is very similar to #4080 (but with different "types"). And in general with the fact that our substitution behavior only work on a set of pre-defined field — where we could make it way more generic. |
Thank you, the issue you mentioned is indeed very helpful. I really hope that you'll provide a generic solution with different "types". |
Hello Tekon, I'm trying to use
It's because
|
Hello Tekon community! While trying to make the
runAsUser
andrunAsGroup
fields in thesecurityContext
dynamic by referencing parameters in a PipelineRun and TaskRun, an error occurs during admission:An error occurred admission webhook "webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: cannot unmarshal string into Go struct field PodSecurityContext.spec.podTemplate.securityContext.runAsGroup of type int64
This seems to indicate that the securityContext parameters expect integer values directly and cannot accept string parameters.
Here are examples for Task & TaskRun that demonstrate the issue:
Is there a known workaround or alternative solution for this?
Is this behavior expected or is it addressed in future versions of Tekton?
The text was updated successfully, but these errors were encountered: