gatling-operator icon indicating copy to clipboard operation
gatling-operator copied to clipboard

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

Open andrzejmikolajczakds opened this issue 1 year ago • 4 comments

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 avatar Nov 27 '24 14:11 andrzejmikolajczakds

@kane8n can I prepare PR for the feature?

andrzejmikolajczakds avatar Dec 03 '24 08:12 andrzejmikolajczakds

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

kane8n avatar Dec 23 '24 10:12 kane8n

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.

andrzejmikolajczakds avatar Jan 27 '25 14:01 andrzejmikolajczakds

@andrzejmikolajczakds Sorry for the late reply. I understand the situation! If you can get me a PR, I will review it for you!

kane8n avatar Mar 06 '25 00:03 kane8n