github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/integration/kubernetes/runtimeclass_workloads/initContainer-shared-volume.yaml (about) 1 # 2 # Copyright (c) 2019 Intel Corporation 3 # 4 # SPDX-License-Identifier: Apache-2.0 5 # 6 apiVersion: v1 7 kind: Pod 8 metadata: 9 name: initcontainer-shared-volume 10 spec: 11 terminationGracePeriodSeconds: 0 12 runtimeClassName: kata 13 initContainers: 14 - name: first 15 image: quay.io/prometheus/busybox:latest 16 command: [ "sh", "-c", "echo ${EPOCHREALTIME//.} > /volume/initContainer" ] 17 volumeMounts: 18 - mountPath: /volume 19 name: volume 20 containers: 21 - name: last 22 image: quay.io/prometheus/busybox:latest 23 command: [ "sh", "-c", "echo ${EPOCHREALTIME//.} > /volume/container; tail -f /dev/null" ] 24 volumeMounts: 25 - mountPath: /volume 26 name: volume 27 volumes: 28 - name: volume 29 emptyDir: {}