Skip to content

Commit

Permalink
Add labels to the slave pods
Browse files Browse the repository at this point in the history
Signed-off-by: Aman Parauliya <[email protected]>
  • Loading branch information
parauliya committed Sep 20, 2023
1 parent 2589c15 commit 8c312e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/executor/jmeterd/pkg/slaves/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ func (client *Client) getSlavePodConfiguration(currentSlavesCount int) (*v1.Pod,
return &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: podName,
Labels: map[string]string{
// Execution Id is the only unique field in case of multiple runs of the same test
// So this is the only field which can tag the slave pods to actual job of jmeterd executor
"testkube.io/managed-by": client.execution.Id,
"testkube.io/test-name": client.execution.TestName,
},
},
Spec: v1.PodSpec{
RestartPolicy: v1.RestartPolicyAlways,
Expand Down

0 comments on commit 8c312e9

Please sign in to comment.