mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-20 20:52:07 +00:00
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>
38 lines
799 B
YAML
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
|