You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "giovannidalloglio (via GitHub)" <gi...@apache.org> on 2024/10/10 21:45:30 UTC

[I] Improvement Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

giovannidalloglio opened a new issue, #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   Hello.
   
   Do you fully support the kubernetes Job api?
   
   In the documentation (https://dolphinscheduler.apache.org/en-us/docs/3.2.2/guide/task/kubernetes) i just see the option to specify a single container.
   
   But various "enterprise" scenarios require the full set of options (https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/).
   
   As example, in our environment we need a "worker" container, and two differente sidecar containers (one of them is the "tunnel" to the DB, etc...)
   
   Is it possibile to run those kind of jobs?
   
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2406437125

   > @giovannidalloglio
   > 
   > Currently, not all capabilities and features of K8S Job are fully supported. At present, only the definition of a single container in `spec.template.spec.containers` is supported; multiple container definitions are not supported. Perhaps in the future, we can allow users to customize the `spec.template` of the Job, but this is not supported at the moment.
   > 
   > In my personal understanding, Sidecars belong to the general capabilities of the infrastructure and should not be customized by users. Administrator can use tools like [gatekeeper](https://github.com/open-policy-agent/gatekeeper) to inject more custom features.
   > 
   > cc @fuchanghai @Mighten @SbloodyS @ruanwenjun
   
   +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2613647000

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "giovannidalloglio (via GitHub)" <gi...@apache.org>.
giovannidalloglio commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2453008795

   @SbloodyS 
   > > In my personal understanding, Sidecars belong to the general capabilities of the infrastructure and should not be customized by users. Administrator can use tools like [gatekeeper](https://github.com/open-policy-agent/gatekeeper) to inject more custom features.
   
   you are generally rigth... but there are complex situation (like a bank) where hundreds of different applications will have to share the same cluster, and those cases are not manageable with an aproach "one size fits all"... they give some guidelines and let developers sort out.
   
   In my case, we use a DB (provided by the cloud vendor) that is connectable only via sidecar container (that work as a proxy), while another sidecar container keeps some general settings. My sidecar containers are "always on", but since the kubernetes job ends when all "main" containers are done... we have a case of "main + sidecar".
   
   At the moment, we are evaluating dolphin; if we'll decide to continue, I'll probably implement a variation of the current kubernetes task (maybe in the GUI we can add a selector "adavanced mode" and a wide textbox, to let the user write his own YAML file... something similar to what you did in the "cluster configuration" part).
   Of course, if you guide me enough, the outcome can be something solid and good enough to be pulled in your main repository...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "Gallardot (via GitHub)" <gi...@apache.org>.
Gallardot commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2453031728

   > you are generally rigth... but there are complex situation (like a bank) where hundreds of different applications will have to share the same cluster, and those cases are not manageable with an aproach "one size fits all"... they give some guidelines and let developers sort out.
   > 
   > In my case, we use a DB (provided by the cloud vendor) that is connectable only via sidecar container (that work as a proxy), while another sidecar container keeps some general settings. My sidecar containers are "always on", but since the kubernetes job ends when all "main" containers are done... we have a case of "main + sidecar".
   > 
   > At the moment, we are evaluating dolphin; if we'll decide to continue, I'll probably implement a variation of the current kubernetes task (maybe in the GUI we can add a selector "adavanced mode" and a wide textbox, to let the user write his own YAML file... something similar to what you did in the "cluster configuration" part). Of course, if you guide me enough, the outcome can be something solid and good enough to be pulled in your main repository...
   
   @giovannidalloglio 
   First, I believe that this scenario makes sense and is a beneficial feature for the K8S task.  However, allowing users to write the entire YAML file of a `Job` can introduce issues such as security risks and excessive flexibility, which can require a lot of work.
   
   Therefore, I propose to provide an advanced mode that allows users to write only the [initContainer](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#jobs-with-sidecar-containers) sections.  This is a balanced approach.  This change does not greatly affect security. It's just a small number of changes.
   
   However, I still have a question: does storage need to be shared between containers, i.e., do we need to mount volumes?
   
   cc: @SbloodyS @EricGao888 @Radeity @ruanwenjun 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2649554328

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "Gallardot (via GitHub)" <gi...@apache.org>.
Gallardot commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2406402341

   @giovannidalloglio 
   
   Currently, not all capabilities and features of K8S Job are fully supported.
   At present, only the definition of a single container in `spec.template.spec.containers` is supported;  multiple container definitions are not supported.
   Perhaps in the future, we can allow users to customize the `spec.template` of the Job, but this is not supported at the moment.
   
   In my personal understanding, Sidecars belong to the general capabilities of the infrastructure and should not be customized by users.  Administrator can use tools like [gatekeeper](https://github.com/open-policy-agent/gatekeeper) to inject more custom features.
   
   cc @fuchanghai @Mighten @SbloodyS @ruanwenjun  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Improvement Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2406335507

   cc @Gallardot 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "giovannidalloglio (via GitHub)" <gi...@apache.org>.
giovannidalloglio commented on issue #16685:
URL: https://github.com/apache/dolphinscheduler/issues/16685#issuecomment-2454574552

   @Gallardot
   You have a point while you speak about "introducing security risks and excessive flexibility".
   I'm 100% with you on this. 
   
   I proposed to "write your own full YAMLs" because there are also other considerations (that I not mentioned before).
   Eg. we use use annotations and labels to charge the costs accordingly, and those things are in the head of the YAML.
   we also need volumes: we install some configuration files, and mount them as configMap volumes.
   And, to be future-proof, maximum flexibility seemed to be the best approach...
   
   But i understand your concerns... More thinking is needed....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc [dolphinscheduler]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #16685: [Improvement] Kubernetes - execute complex jobs with sidecar containers etc etc
URL: https://github.com/apache/dolphinscheduler/issues/16685


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org