-
Notifications
You must be signed in to change notification settings - Fork 122
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 a k6-loadgen chaos fault #687
Conversation
Signed-off-by: namkyu1999 <[email protected]>
Signed-off-by: namkyu1999 <[email protected]>
HostPath: &corev1.HostPathVolumeSource{ | ||
Path: experimentsDetails.ScriptPath, | ||
}, |
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.
If an end user, who is executing the fault, doesn't have access to the host file system, they won't be able to create the script there and thus execute the fault. Therefore, we should use a ConfigMap to store the script and mount it here. The name of the ConfigMap can be an experiment input (we can have a default name).
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.
I changed this implement so that the script file is mounted in the helper pod using a secret name while taking the name of the secret as an experiment ENV input of go-runner
.
Signed-off-by: namkyu1999 <[email protected]>
Signed-off-by: namkyu1999 <[email protected]>
return common.HelperFailedError(err, appLabel, experimentsDetails.ChaosNamespace, true) | ||
} | ||
|
||
//Deleting all the helper pod for container-kill chaos |
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.
//Deleting all the helper pod for container-kill chaos | |
//Deleting all the helper pod for k6-loadgen chaos |
VolumeMounts: []corev1.VolumeMount{ | ||
{ | ||
Name: volumeName, | ||
MountPath: "/mnt", |
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.
we can use the constant defined above
What this PR does / why we need it:
I have implemented the k6-loadgen chaos fault in this PR based on the proposal.
reference: locust-loadgen
demo chaos hub
-- Repository URL: https://github.com/namkyu1999/chaos-charts
-- Hub Repository Branch: test
-- category: Load
result
dashboard
Which issue this PR fixes : fixes #4309
Special notes for your reviewer: @uditgaurav
Checklist:
breaking-changes
tagrequires-upgrade
tag