Skip to content
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

Add Pod methods #1

Merged
merged 13 commits into from
May 3, 2021
Merged

Add Pod methods #1

merged 13 commits into from
May 3, 2021

Conversation

lxkuz
Copy link
Collaborator

@lxkuz lxkuz commented Apr 23, 2021

@lxkuz lxkuz requested a review from simskij April 23, 2021 08:55
Copy link
Contributor

@simskij simskij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Some suggestions added below :)

kubernetes.go Outdated Show resolved Hide resolved
kubernetes.go Outdated Show resolved Hide resolved
kubernetes.go Show resolved Hide resolved
@lxkuz lxkuz changed the title Add getPods Add getPods method Apr 23, 2021
@lxkuz lxkuz changed the title Add getPods method Add Pod methods Apr 24, 2021
@lxkuz
Copy link
Collaborator Author

lxkuz commented Apr 24, 2021

@simskij comments are handled, Pod Kill and Pod Get added. Review again please

@lxkuz lxkuz requested a review from simskij April 24, 2021 08:55
Copy link
Contributor

@simskij simskij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

README.md Outdated

# xk6-kubernetes
A k6 extension for using of K8s in testing. Built for [k6](https://github.com/loadimpact/k6) using [xk6](https://github.com/k6io/xk6).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A k6 extension for using of K8s in testing. Built for [k6](https://github.com/loadimpact/k6) using [xk6](https://github.com/k6io/xk6).
A k6 extension for interacting with Kubernetes clusters while testing. Built for [k6](https://github.com/loadimpact/k6) using [xk6](https://github.com/k6io/xk6).

pods.go Outdated
)

type PodsNamespace struct {
Client *kubernetes.Clientset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be private, right?

.gitattributes Show resolved Hide resolved
let podsList = getPodNames(nameSpace, kubernetes)
const podName = Object.keys(podsList)[0]
kubernetes.pods.kill(podName, nameSpace)
// TODO: for some reason we can't feel terminating status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is determined by checking pod.object_meta.deletion_timestamp. If it's not null, it has received a termination instruction. Maybe kubernetes.pods.isTerminating(pod) could return a bool based on this condition, as state changes won't be pushed to the js object you already have.

@lxkuz
Copy link
Collaborator Author

lxkuz commented May 1, 2021

@simskij comments handled review again, please. The rest functionality will be handled in upcoming PRs.

@lxkuz lxkuz requested a review from simskij May 1, 2021 18:03
@simskij simskij merged commit c0c0aa8 into main May 3, 2021
@simskij simskij deleted the init branch May 3, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants