diff --git a/internal/k8sinternal/runtime_test.go b/internal/k8sinternal/runtime_test.go index d4211ba4..33c66045 100644 --- a/internal/k8sinternal/runtime_test.go +++ b/internal/k8sinternal/runtime_test.go @@ -45,9 +45,6 @@ func TestEncodeDecode(t *testing.T) { func TestGetContainers(t *testing.T) { for _, resource := range getAllResources(t) { - if !k8s.IsSupportedResourceType(resource) { - continue - } containers := k8s.GetContainers(resource) switch resource.(type) { case *k8s.NamespaceV1: @@ -96,9 +93,6 @@ func TestGetObjectMeta(t *testing.T) { func TestGetPodTemplateSpec(t *testing.T) { for _, resource := range getAllResources(t) { - if !k8s.IsSupportedResourceType(resource) { - continue - } podTemplateSpec := k8s.GetPodTemplateSpec(resource) switch resource.(type) { case *k8s.PodV1, *k8s.NamespaceV1: diff --git a/pkg/k8s/types.go b/pkg/k8s/types.go index 0b231c29..76579aab 100644 --- a/pkg/k8s/types.go +++ b/pkg/k8s/types.go @@ -111,8 +111,3 @@ type TypeMetaV1 = metav1.TypeMeta // UnsupportedType is a type alias for v1 version of the k8s apps API, this is meant for testing type UnsupportedType = apiv1.Binding - -// IsSupportedResourceType returns true if obj is a supported Kubernetes resource type -func IsSupportedResourceType(obj Resource) bool { - return true -} diff --git a/util.go b/util.go index f987e275..c620241a 100644 --- a/util.go +++ b/util.go @@ -65,16 +65,6 @@ func auditResource(resource KubeResource, resources []KubeResource, auditables [ return result, nil } - if !k8s.IsSupportedResourceType(resource.Object()) { - auditResult := &AuditResult{ - Name: ErrorUnsupportedResource, - Severity: Warn, - Message: "Resource is not currently supported.", - } - result.AuditResults = append(result.AuditResults, auditResult) - return result, nil - } - for _, auditable := range auditables { auditResults, err := auditable.Audit(resource.Object(), unwrapResources(resources)) if err != nil {