@@ -23,7 +23,7 @@ package k8sutil
2323import (
2424 "context"
2525
26- appsv1 "k8s.io/api/apps/v1"
26+ apps "k8s.io/api/apps/v1"
2727 core "k8s.io/api/core/v1"
2828 meta "k8s.io/apimachinery/pkg/apis/meta/v1"
2929 "k8s.io/client-go/kubernetes"
@@ -33,7 +33,7 @@ import (
3333
3434// GetPodOwner returns the ReplicaSet that owns the given Pod.
3535// If the Pod has no owner of the owner is not a ReplicaSet, nil is returned.
36- func GetPodOwner (kubecli kubernetes.Interface , pod * core.Pod , ns string ) (* appsv1 .ReplicaSet , error ) {
36+ func GetPodOwner (kubecli kubernetes.Interface , pod * core.Pod , ns string ) (* apps .ReplicaSet , error ) {
3737 for _ , ref := range pod .GetOwnerReferences () {
3838 if ref .Kind == "ReplicaSet" {
3939 rSets := kubecli .AppsV1 ().ReplicaSets (pod .GetNamespace ())
@@ -49,7 +49,7 @@ func GetPodOwner(kubecli kubernetes.Interface, pod *core.Pod, ns string) (*appsv
4949
5050// GetReplicaSetOwner returns the Deployment that owns the given ReplicaSet.
5151// If the ReplicaSet has no owner of the owner is not a Deployment, nil is returned.
52- func GetReplicaSetOwner (kubecli kubernetes.Interface , rSet * appsv1 .ReplicaSet , ns string ) (* appsv1 .Deployment , error ) {
52+ func GetReplicaSetOwner (kubecli kubernetes.Interface , rSet * apps .ReplicaSet , ns string ) (* apps .Deployment , error ) {
5353 for _ , ref := range rSet .GetOwnerReferences () {
5454 if ref .Kind == "Deployment" {
5555 depls := kubecli .AppsV1 ().Deployments (rSet .GetNamespace ())
0 commit comments