On Mon, Sep 30, 2024 at 5:55 AM Dreamy Jazz <[email protected]> wrote:
> I have the occasional need to run a maintenance script manually one-off > for a set amount of time. I used the "timeout" command with "mwscript" to > exit the script after a specified amount of time. However, I cannot see an > easy way to achieve this, as the mwscript-k8s command exiting doesn't stop > the execution of the maintenance script. > Hi Dreamy, I don't think this would be too hard to implement. I think we could plumb through a new CLI argument for mwscript-k8s that, if set, would set the .spec.activeDeadlineSeconds field on the k8s Job object. It would be a small patch to the Helm chart and to the Python script. The activeDeadlineSeconds field has the following behavior: https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-termination-and-cleanup Can you confirm this sounds good to you? Thanks! -- Chris Danis (they/them) Staff Site Reliability Engineer Wikimedia Foundation
_______________________________________________ Wikitech-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
