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

Change logic in WorkLoad retrieval when OwnerReference of Pod is no Controller

Open waodim opened this issue 9 months ago • 1 comments

Description

Respective ticket: https://dt-rnd.atlassian.net/browse/K8S-9998

Because we normally assign the podName to the workload info in a certain corner case (when we have a ownerreference which is no controller) it can occur that the DT_WORKLOAD_KIND env var is set to empty.

This is fixed by simply using GenerateName instead of Name.

How can this be tested?

  • unit tests
  • I am not really sure how to properly test it otherwise at it seems to be a corner case which needs special set up

waodim avatar May 16 '24 13:05 waodim