-
Notifications
You must be signed in to change notification settings - Fork 118
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 one-shot mode #66
Comments
@LucasRoesler @stefanprodan WDYT? |
Related to: openfaas/faas#657 |
@alexellis without a sidecar, how would the request to |
Sorry I don't understand the question. |
The batch job use-case would be like I shared in my tweet in the original post above. Container 1 - curl or similar process - calls 127.0.0.1:8080 with payload Result of invocation is available via STDIO, or with Container 3 which would save away the result. |
The overall workflow would be out of scope for this flag / feature addition. The suggested feature is simply a graceful shutdown after processing a single HTTP invoke request. |
Expected Behaviour
To enable the "batch job" use-case, users should be able to specify a "one shot" mode or parameter. This would allow unlimited requests to /healthz and /metrics, but only a single request to
/
, after which it would shutdown the binary process.This is partially to work around limitations in Kubernetes jobs with daemons, web-servers and side-cars which keep the job in a "running" status.
kubernetes/kubernetes#25908
kubernetes/enhancements#753
Argo workflows does appear to work in "sidecar" mode without any additional changes to the watchdog, but I suspect building on Kubernetes Jobs would be cleaner from a dependencies point of view.
Example with figlet container:
https://twitter.com/alexellisuk/status/1148239010034311169
Example in Argo docs on sidecars:
https://github.com/argoproj/argo/blob/master/examples/README.md#sidecars
The text was updated successfully, but these errors were encountered: