From 0501f749ba0fae552672d194f172ac5f26676341 Mon Sep 17 00:00:00 2001 From: ekgns33 Date: Wed, 15 May 2024 23:15:37 +0900 Subject: [PATCH] feat : add lifecycle hook to example application --- config/samples/app_v1alpha1_application.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/samples/app_v1alpha1_application.yaml b/config/samples/app_v1alpha1_application.yaml index 097892a..e0e236c 100644 --- a/config/samples/app_v1alpha1_application.yaml +++ b/config/samples/app_v1alpha1_application.yaml @@ -14,3 +14,10 @@ spec: containerName: nginx image: nginx:latest containerPort: 80 + 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"] \ No newline at end of file