mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-27 20:18:57 +00:00
tests/k8s: add set_node() to lib.sh
Use this new function to set the node where the pod should be scheduled to. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
parent
c6075c8627
commit
1eae657b91
@ -150,6 +150,20 @@ set_metadata_annotation() {
|
||||
yq w -i --style=double "${yaml}" "${annotation_key}" "${value}"
|
||||
}
|
||||
|
||||
# Set the node name on configuration spec.
|
||||
#
|
||||
# Parameters:
|
||||
# $1 - the yaml file
|
||||
# $2 - the node name
|
||||
#
|
||||
set_node() {
|
||||
local yaml="$1"
|
||||
local node="$2"
|
||||
[ -n "$node" ] || return 1
|
||||
|
||||
yq w -i "${yaml}" "spec.nodeName" "$node"
|
||||
}
|
||||
|
||||
# Get the systemd's journal from a worker node
|
||||
#
|
||||
# Parameters:
|
||||
|
Loading…
Reference in New Issue
Block a user