github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/integration/kubernetes/runtimeclass_workloads/initcontainer-shareprocesspid.yaml (about)

     1  #
     2  # Copyright (c) 2022 AntGroup Corporation
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  apiVersion: v1
     7  kind: Pod
     8  metadata:
     9    name: busybox
    10  spec:
    11    terminationGracePeriodSeconds: 0
    12    shareProcessNamespace: true
    13    runtimeClassName: kata
    14    initContainers:
    15    - name: first
    16      image: quay.io/prometheus/busybox:latest
    17      command: [ "sh", "-c", "echo 'nohup tail -f /dev/null  >/dev/null 2>&1 &' > /init.sh && chmod +x /init.sh && /init.sh" ]
    18    containers:
    19    - name: first-test-container
    20      image: quay.io/prometheus/busybox:latest
    21      env:
    22      - name: CONTAINER_NAME
    23        value: "first-test-container"
    24      command:
    25          - sleep
    26          - "300"