Skip to content

Commit

Permalink
Merge pull request #44 from robusta-dev/ingress-create-op
Browse files Browse the repository at this point in the history
Fix extraction of ingress meta
  • Loading branch information
arikalon1 authored May 7, 2023
2 parents 5eb2572 + a1a57a7 commit d093794
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/utils/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
batch_v1 "k8s.io/api/batch/v1"
api_v1 "k8s.io/api/core/v1"
ext_v1beta1 "k8s.io/api/extensions/v1beta1"
networking_v1 "k8s.io/api/networking/v1"
rbac_v1 "k8s.io/api/rbac/v1"
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -79,14 +81,22 @@ func GetObjectMetaData(obj interface{}) (objectMeta meta_v1.ObjectMeta) {
objectMeta = object.ObjectMeta
case *ext_v1beta1.Ingress:
objectMeta = object.ObjectMeta
case *networking_v1.Ingress:
objectMeta = object.ObjectMeta
case *api_v1.Node:
objectMeta = object.ObjectMeta
case *rbac_v1beta1.ClusterRole:
objectMeta = object.ObjectMeta
case *rbac_v1.ClusterRole:
objectMeta = object.ObjectMeta
case *rbac_v1beta1.ClusterRoleBinding:
objectMeta = object.ObjectMeta
case *rbac_v1.ClusterRoleBinding:
objectMeta = object.ObjectMeta
case *api_v1.ServiceAccount:
objectMeta = object.ObjectMeta
case *api_v1.ConfigMap:
objectMeta = object.ObjectMeta
case *api_v1.Event:
objectMeta = object.ObjectMeta
}
Expand Down

0 comments on commit d093794

Please sign in to comment.