New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e2e: add test for dynamic balloons configuration update #831
Conversation
Needs balloons configuration update patch from PR #830. |
0d5740e
to
4588475
Compare
cleanup() { | ||
kubectl delete pods --all --now | ||
( kubectl delete namespace $testns ) | ||
( kubectl delete btype1ns0 ) | ||
terminate cri-resmgr | ||
terminate cri-resmgr-agent | ||
vm-command "cri-resmgr -reset-policy; cri-resmgr -reset-config" | ||
} | ||
|
||
apply-configmap() { | ||
vm-put-file $(instantiate balloons-configmap.yaml) balloons-configmap.yaml | ||
vm-command "cat balloons-configmap.yaml" | ||
kubectl apply -f balloons-configmap.yaml | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... shouldn't it be something like:
cleanup() {
vm-command "kubectl delete pods --all --now; \
kubectl delete pods -n $testns --all --now; \
kubectl delete pods -n btype1ns0 --all --now; \
kubectl delete namespace $testns || :; \
kubectl delete namespace btype1ns0 || :"
terminate cri-resmgr
terminate cri-resmgr-agent
vm-command "cri-resmgr -reset-policy; cri-resmgr -reset-config"
}
apply-configmap() {
vm-put-file $(instantiate balloons-configmap.yaml) balloons-configmap.yaml
vm-command "cat balloons-configmap.yaml"
vm-command "kubectl apply -f balloons-configmap.yaml"
}
BTYPE0_CPUCLASS="classC" BTYPE1_SKIP=1 BTYPE2_CPUCLASS="classB" BTYPE2_NAMESPACE0='"*"' apply-configmap | ||
verify-metrics-has-line 'btype0\[0\].*pod0:pod0c0.*cpu_class="classC"' | ||
verify-metrics-has-line 'btype2\[0\].*pod1:pod1c0.*cpu_class="classB"' | ||
verify-metrics-has-line 'btype2\[0\].*pod2:pod2c0.*cpu_class="classB"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And do a final
cleanup
here at the end too, please.
- Add new test that changes balloons and CPU configurations using a config map. - Refactor verify-metrics functions to a common source file.
4588475
to
85abe96
Compare
test/e2e/policies.test-suite/balloons/n4c16/test06-update-configmap/code.var.sh
Show resolved
Hide resolved
test/e2e/policies.test-suite/balloons/n4c16/test06-update-configmap/code.var.sh
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
config map.