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

[Feature Request]: unique numerical identifier for each Pod in a Kubernetes Cluster #127

Open
andrzejmikolajczakds opened this issue Nov 27, 2024 · 3 comments

Comments

@andrzejmikolajczakds
Copy link
Contributor

Summary

I propose a new feature that provides a unique numerical identifier for each Pod in a Kubernetes Cluster.

In scenarios where the parallelism is set to n, n Jobs are created and deployed to the Cluster.

Each Job, upon instantiation, would get a unique numerical identifier (1, 2, 3, ..., n) stored in the Pod environment variables.

I am willing to contribute to this improvement in the gatling-operator.

Thank you for considering this request.

@andrzejmikolajczakds andrzejmikolajczakds changed the title [Feature Request]: Add pod number as a env into each GatlingRunnerJob pod [Feature Request]: unique numerical identifier for each Pod in a Kubernetes Cluster Nov 27, 2024
@andrzejmikolajczakds
Copy link
Contributor Author

@kane8n can I prepare PR for the feature?

@kane8n
Copy link
Contributor

kane8n commented Dec 23, 2024

@andrzejmikolajczakds
Thank you for your suggestions!
Could you inform me of explain in more detail the benefits of implementing this?

@andrzejmikolajczakds
Copy link
Contributor Author

Currently gatling operator run instances where the only difference between run instances is environment variable containing a random string passed by kubernetes. EG HOSTNAME.

In our project we need to process repeatable tests using multiple test instances.
eg:
We need to generate/update 500 resources using 5 instances. So we would like that
instance 1 will generate/update resource with ID: instanceId-1-resource-1, instanceId-1-resource-2, ..... instanceId-1-resource-100
instance 2 will generate/update resource with ID: instanceId-2-resource-1, instanceId-2-resource-2, ..... instanceId-2-resource-100
.
.
.

Having InstanceId as a variable in run POD we can do this and next tests run will generate/update the same resources.

Using environment variable containing a random string passed by kubernetes each tests run will generate resources which ID are not repeatable in next tests runs.

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

No branches or pull requests

2 participants