Skip to content

Commit

Permalink
e2e: support memory-type annotations in created pods
Browse files Browse the repository at this point in the history
"MEMTYPE=x create ..." in test scripts creates a guaranteed or
burstable pod with "memory-type...: x" annotation effective for all
containers in the pod.

Signed-off-by: Antti Kervinen <[email protected]>
  • Loading branch information
askervin authored and klihub committed Sep 18, 2024
1 parent fade0eb commit 1585cb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/e2e/files/burstable.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ metadata:
$(for lbl in ${!LABEL*}; do [[ "$lbl" == LABEL[0-9]* ]] && echo "
${!lbl}
"; done)
$([ -n "${!ANN*}" ] && echo "
$( ( [ -n "${!ANN*}" ] || [ -n "$MEMTYPE" ] ) && echo "
annotations:
$(for ann in ${!ANN*}; do [[ "$ann" == ANN[0-9]* ]] && echo "
${!ann}
"; done)
$( [ -n "$MEMTYPE" ] && echo "
memory-type.resource-policy.nri.io: $MEMTYPE
")
")
spec:
containers:
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/files/guaranteed.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ metadata:
$(for lbl in ${!LABEL*}; do [[ "$lbl" == LABEL[0-9]* ]] && echo "
${!lbl}
"; done)
$([ -n "${!ANN*}" ] && echo "
$( ( [ -n "${!ANN*}" ] || [ -n "$MEMTYPE" ] ) && echo "
annotations:
$(for ann in ${!ANN*}; do [[ "$ann" == ANN[0-9]* ]] && echo "
${!ann}
"; done)
$( [ -n "$MEMTYPE" ] && echo "
memory-type.resource-policy.nri.io: $MEMTYPE
")
")
spec:
$(if [ -n "$ICONTCOUNT" ]; then echo "
Expand Down

0 comments on commit 1585cb6

Please sign in to comment.