github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/integration/kubernetes/runtimeclass_workloads/pod-env.yaml (about) 1 # 2 # Copyright (c) 2018 Intel Corporation 3 # 4 # SPDX-License-Identifier: Apache-2.0 5 # 6 apiVersion: v1 7 kind: Pod 8 metadata: 9 name: test-env 10 spec: 11 terminationGracePeriodSeconds: 0 12 runtimeClassName: kata 13 containers: 14 - name: test-container 15 image: quay.io/prometheus/busybox:latest 16 command: [ "sh", "-c"] 17 args: 18 - while true; do 19 echo -en '\n'; 20 printenv MY_POD_NAME; 21 printenv HOST_IP; 22 printenv MEMORY_REQUESTS; 23 printenv MEMORY_LIMITS; 24 sleep 1; 25 done; 26 resources: 27 requests: 28 memory: "32Mi" 29 env: 30 - name: MY_POD_NAME 31 valueFrom: 32 fieldRef: 33 fieldPath: metadata.name 34 - name: HOST_IP 35 valueFrom: 36 fieldRef: 37 fieldPath: status.hostIP 38 - name: MEMORY_REQUESTS 39 valueFrom: 40 resourceFieldRef: 41 resource: requests.memory 42 - name: MEMORY_LIMITS 43 valueFrom: 44 resourceFieldRef: 45 resource: limits.memory 46 restartPolicy: Never