Skip to content

Commit 10e9b77

Browse files
authored
Update workloads.go (#705)
Fix issue with empty kind field Signed-off-by: Andrii Kotelnikov <[email protected]>
1 parent 9689f74 commit 10e9b77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/workloads/workloads.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func getPodsFromWorkload(target types.AppDetails, allPods *kcorev1.PodList, dyna
7373
func GetPodOwnerTypeAndName(pod *kcorev1.Pod, dynamicClient dynamic.Interface) (parentType, parentName string, err error) {
7474
for _, owner := range pod.GetOwnerReferences() {
7575
parentName = owner.Name
76+
parentType = strings.ToLower(owner.Kind)
7677
if owner.Kind == "StatefulSet" || owner.Kind == "DaemonSet" {
7778
return strings.ToLower(owner.Kind), parentName, nil
7879
}

0 commit comments

Comments
 (0)