-
Notifications
You must be signed in to change notification settings - Fork 420
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
Feature request: Eventlistener should support customized podTemplate #505
Comments
/kind feature |
/area api |
This issue sounds similar to #440. I wonder if we can address both issues in the same way? |
Yeah this seems like a very reasonable feature request. I'm for adding this |
I wonder if a podTemplate would be enough though....is there a need for customizing things such as number of replicas etc.? |
This would be really nice to have this to be able to configure "resource request" for the event-listener pod 👼 |
That's a good point, maybe having a That said, I think we might want to consider |
From the WG discussion today:
|
I do agree on both. I do prefer the approach on having the least kubernetes primitive in there. As far as I can, the only need we have right now are resource request/limits and replicas. |
We also need to add tolerations or nodeSelector |
Maybe we can add a config object for following configs
and hard code following settings:
If this works, I would like to submit patches. |
Curious about |
Knative has a duck type for thing that should expect to look like a Pod: https://godoc.org/github.com/knative/pkg/apis/duck/v1#PodSpecable The idea is that tools and libraries can operate on a number of Pod-alike things, e.g. Knative services and K8s Pods and Deployments. @mattmoor in case I've mischaracterized or there's a better canonical description of this model. |
Imagepullpolicy is needed when we need to validate image before we start a pod.( In this case we need to set imagepullpolicy to Always ). One possible policy is: image doesn't contains vulnerabilities. This can be achieved by enforcing the security policy in image registries( harbor or jfrog artifacts) |
@dibyom asked that I echo a concern I noted in recent triggers wg call around use of the entire podtemplate as it exposes the podsecuritycontext (https://github.com/kubernetes/api/blob/master/core/v1/types.go#L2960) allowing controllers to set these on behalf of requesting users is a slippery slope certainly tektoncd/pipelines is already allowing it as well with PodTemplate being embedded in the core types, but in general is using namespace containment as the workaround SAR based checks by the controller on behalf of a requesting users for RBAC encapsulations around podsecuritypolicies (https://kubernetes.io/docs/concepts/policy/pod-security-policy/#via-rbac) should be a long term goal in both pipeline and triggers projects I am aware that SAR checks has come up in some issue discussion with a few scenarios in both projects, but I'm not aware of a feature on a current or soon to be upcoming roadmap that introduces them at the levels I'm referring to. If I'm incorrect, please inform me. Otherwise, I'm looking to fill that gap. In partcilar, I'll mention what @dibyom and the folks on the triggers WG are already aware of. I do have a tektoncd/pipelines prototype that introduces SAR checks, but is not quite ready for demo and public introduction. I hope to get there in the next couple of weeks, where I can at least demo. And then from there work on design proposals, engagement with pipeline and API WG's, etc. It leverages the knative admission controller / webhook utilities already used by tekton, and introduces requesting user to TaskRun and PipelineRun A similar approach could be employed by triggers for a full PodTemplate that exposes PodSecurityPolicy if that comes to pass. |
(SAR stands for |
I would like to be able to add a sidecar proxy to the event sink container, for security purposes. Maybe that's an additional use case for the custom podTemplate. |
My prototype is at least demoable / presentable for community consumption. My hope is to show it / talk to it during the trigger/pipeline WG meetings next Tuesday and Wednesday, May 12/13
|
Those all sound like good use cases. The only image that this would apply to is the EventListener sink so I'm wondering if one alternative here is that the operator passes in the right image to the Triggers controller (currently this is passed via a flag, the operator could update the flag to use a blessed image. |
@gabemontero thanks for the write up and looking forward to the demo!! One thing about
@msjostrom interesting...would this be service mesh like Istio that can be automatically injected via a admission controller? |
yep if the use of PodTemplate is narrowed at that level I would concur wrt the relative risk assessment @dibyom
|
I guess it could be, but in my current case I want to use the openshift oauth-proxy sidecar to force the event producer to authenticate using an openshift issued token. To really make it work, I would need the possibility to tell tektoncd-triggers-eventlistenersink image to only listen to localhost as well, to prevent bypassing of the sidecar proxy. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
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. |
@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. |
We now support a minimal customized podTemplate. We can add more fields if we need to or TEP-008 proposes a way to include a full customl PodSpec if needed. |
I am confused on why this issue was closed. The documentation mentions podTemplate only support nodeSelector and tolerations? Is that the "minimal customized podTemptate" mentioned? I have a need to be able to define the resources for the pod's that are spun up. Am I missing another means by which this is accomplished or is everyone just using their namespaced defaults? |
@robermar23 sorry for the delay. I opened a new feature request to track setting resource requirements in #792 |
Expected Behavior
Event listener should accept customizable default pod template as what tekton pipeline did.
If we can add a field in CRD that would be better
Actual Behavior
Event listener is created using the default deployment template. But it doesn't comply with our schedule policy.
Additional Info
tektoncd/pipeline#1901
The text was updated successfully, but these errors were encountered: