OpenLiberty / open-liberty-operator

Eclipse Public License 2.0
28 stars 36 forks source link

Add support for podStart handlers for the app container #547

Open Jonathan-Maciel opened 5 months ago

Jonathan-Maciel commented 5 months ago

Feature Request

Allow usage of the postStart and preStop lifecycle handlers with the operator.

apiVersion: v1
kind: Pod
metadata:
  name: lifecycle-demo
spec:
  containers:
  - name: lifecycle-demo-container
    image: nginx
    lifecycle:
      postStart:
        exec:
          command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
      preStop:
        exec:
          command: ["/bin/sh","-c","nginx -s quit; while killall -0 nginx; do sleep 1; done"]