kata-containers/tests/integration/kubernetes/runtimeclass_workloads/custom-node-debugger.yaml
Hyounggyu Choi 374b8d2534 tests: Create and delete node debugger pod only once
Creating and deleting a node debugger pod for every `exec_host()`
call is inefficient.
This commit changes the test suite to create and delete the pod
only once, globally.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-09-20 14:37:43 +02:00

38 lines
799 B
YAML

#
# Copyright (c) IBM Corp. 2024
#
# SPDX-License-Identifier: Apache-2.0
#
apiVersion: v1
kind: Pod
metadata:
name: ${POD_NAME}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- ${NODE_NAME}
containers:
- name: node-debugger-container
image: quay.io/bedrock/ubuntu:latest
command: ["/bin/sh", "-c", "sleep infinity"]
stdin: true
tty: true
securityContext:
privileged: true
runAsUser: 0
allowPrivilegeEscalation: true
volumeMounts:
- name: host-root
mountPath: /host
volumes:
- name: host-root
hostPath:
path: /
type: Directory