#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

apiVersion: v1
kind: Pod
metadata:
  name: handlers
spec:
  runtimeClassName: kata
  containers:
  - name: handlers-container
    image: "${nginx_version}"
    lifecycle:
      postStart:
        exec:
          command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
      preStop:
        exec:
          command: ["/usr/sbin/nginx","-s","quit"]
