Skip to content
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 pod lifecycle options #463

Open
c-thiel opened this issue Nov 11, 2021 · 7 comments
Open

Add pod lifecycle options #463

c-thiel opened this issue Nov 11, 2021 · 7 comments
Labels
kind/enhancement kind - new features or changes

Comments

@c-thiel
Copy link

c-thiel commented Nov 11, 2021

What is your feature request?
In the Chart we currently don't have an option to add a lifecycle to the pods.
These lifecycle hooks can be useful in a number of situations where we need to patch small parts of the pod.
An example could be:

          lifecycle:
            postStart:
              exec:
                command: ["/bin/sh", "-c", do_something.sh]

To give a concrete example, I am currently facing this issue apache/airflow#8212.
To fix this I need to patch a single file in the container. I could of course go ahead and build my custom container - having a lifecycle hook would be very simple though.

Implementation should be really simple and straight forward - just forwarding whatever the user specifies in the values.yaml.

It would be good to have this, as anything else, once globally and additionaly an option to overwrite for the individual components.

@c-thiel c-thiel added the kind/enhancement kind - new features or changes label Nov 11, 2021
@thesuperzapper
Copy link
Member

@c-thiel Sounds like an interesting idea, what do you think the values could look like?

@thesuperzapper thesuperzapper added this to Unsorted in Issue Triage and PR Tracking via automation Nov 11, 2021
@thesuperzapper thesuperzapper moved this from Unsorted to To Investigate in Issue Triage and PR Tracking Nov 11, 2021
@c-thiel
Copy link
Author

c-thiel commented Nov 15, 2021

@thesuperzapper in the values.yaml I would simply add an empty lifecycle: {} option to all components.
This can then be filled by the users according to the docs: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/

@thesuperzapper
Copy link
Member

@c-thiel do you want to create a PR for this feature?

@thesuperzapper thesuperzapper moved this from To Investigate to Waiting for Response in Issue Triage and PR Tracking Dec 14, 2021
@stale stale bot added the lifecycle/stale lifecycle - this is stale label Feb 12, 2022
@stale stale bot closed this as completed Feb 19, 2022
Issue Triage and PR Tracking automation moved this from Issue | Waiting for Response to Done Feb 19, 2022
@thesuperzapper thesuperzapper reopened this Mar 2, 2022
Issue Triage and PR Tracking automation moved this from Done to Unsorted Mar 2, 2022
@stale stale bot removed the lifecycle/stale lifecycle - this is stale label Mar 2, 2022
@thesuperzapper thesuperzapper added lifecycle/frozen lifecycle - this can't become stale lifecycle/stale lifecycle - this is stale labels Mar 2, 2022
@stale stale bot removed the lifecycle/stale lifecycle - this is stale label Mar 2, 2022
@thesuperzapper thesuperzapper moved this from Unsorted to Triage | Needs Investigation in Issue Triage and PR Tracking Mar 2, 2022
@thesuperzapper thesuperzapper removed the lifecycle/frozen lifecycle - this can't become stale label Mar 22, 2022
@airflow-helm airflow-helm deleted a comment from stale bot Mar 22, 2022
@iSWATxJOKERi
Copy link

iSWATxJOKERi commented Oct 4, 2022

Hi, how's it going, is there a possibility of this functionality being added in the future? My team has come across this issue where we want to copy some file from a shared volume to a path on the container and run some extra commands after using a postStart lifecycle hook. But currently aren't able to do so @thesuperzapper without using the stringOverride which makes it difficult to figure out how to get the pod spec right based on the the setup we currently have now

@iSWATxJOKERi
Copy link

Went and created the PR here @thesuperzapper 🤝

@thesuperzapper
Copy link
Member

@iSWATxJOKERi thanks for the PR, I will take a look at it.

@thesuperzapper
Copy link
Member

@iSWATxJOKERi @c-thiel I have made a large comment in #653 (comment) that explains my thoughts around how we might implement a value to allow users to run scripts postStart or preStop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement kind - new features or changes
Projects
Issue Triage and PR Tracking
Triage | Needs Investigation
Development

No branches or pull requests

3 participants