-
Notifications
You must be signed in to change notification settings - Fork 831
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
feat: Add kube api for k6 scaffolding #5494
Conversation
@@ -152,7 +175,7 @@ function tfsimple_join_pipeline() { | |||
seldon pipeline infer join${1} '{"inputs":[{"name":"INPUT0","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]}]}' | |||
seldon pipeline infer join${1} --inference-mode grpc '{"model_name":"simple","inputs":[{"name":"INPUT0","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]}]}' | |||
unload pipeline join${1} /tmp/pipelines/tfsimples-join${1}.yaml | |||
# we cant unload the models here as they are used by other pipelines | |||
# we cant unload the models here as they are used by other pipelines ? |
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.
This was for running multiple smoke tests in parallel, driving load to the same models. (just for context)
tests/k6/k6wrapper.sh
Outdated
@@ -12,7 +12,8 @@ if [ -f "$GOOGLE_APPLICATION_CREDENTIALS" ]; then | |||
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS | |||
fi | |||
echo "start:"$(date) > $DIR/$METADATA | |||
k6 $@ | |||
# use locak k6 that is built with xk6 to include kube apis |
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.
nit: /s/locak/local/
tests/k6/configs/k8s/base/k6.yaml
Outdated
@@ -35,6 +35,14 @@ spec: | |||
# "csv=results/base.gz", | |||
# "scenarios/infer_constant_rate.js", | |||
# ] | |||
# # k8s-test-script |
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.
The idea here would be that atm we'll manually comment/uncomment depending on what types of tests we want to run right?
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.
yes, let me revert it back to the main script.
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, left some minor comments/observations
This PR adds the necessary scaffolding to be able to use kube apis (e.g apply and delete model resources) in our k6 tests.
This is just the initial work with an simple example and we will patch our scenarios incrementally in follow up PRs.
The main addition is using xk6 which provides kubernetes api extensions in k6.
There is an example test scenario
k8s-test-script.js
that showcases a model being created/adjusted/deleted.Other changes:
Tests:
k8s-test-script.js
has been tested as standalone script running against the current kube clusterseldon-v2-controller-manager
service account to give the k6 job kube api authseldonio/seldon-k6:latest
that contains the xk6 changesFixes INFRA-941 (internal)