diff --git a/api/v1/configurationpolicy_types.go b/api/v1/configurationpolicy_types.go index ada14940..9411ab40 100644 --- a/api/v1/configurationpolicy_types.go +++ b/api/v1/configurationpolicy_types.go @@ -328,7 +328,7 @@ type ObjectResource struct { func ObjectResourceFromObj(obj client.Object) ObjectResource { name := obj.GetName() if name == "" { - name = "*" + name = "-" } return ObjectResource{ diff --git a/controllers/operatorpolicy_status.go b/controllers/operatorpolicy_status.go index 07197931..6d1f70f8 100644 --- a/controllers/operatorpolicy_status.go +++ b/controllers/operatorpolicy_status.go @@ -766,7 +766,7 @@ func noInstallPlansObj(namespace string) policyv1.RelatedObject { Kind: installPlanGVK.Kind, APIVersion: installPlanGVK.GroupVersion().String(), Metadata: policyv1.ObjectMetadata{ - Name: "*", + Name: "-", Namespace: namespace, }, }, @@ -839,7 +839,7 @@ var noExistingCSVObj = policyv1.RelatedObject{ Kind: clusterServiceVersionGVK.Kind, APIVersion: clusterServiceVersionGVK.GroupVersion().String(), Metadata: policyv1.ObjectMetadata{ - Name: "*", + Name: "-", }, }, Compliant: string(policyv1.UnknownCompliancy), @@ -886,7 +886,7 @@ var noExistingDeploymentObj = policyv1.RelatedObject{ Kind: deploymentGVK.Kind, APIVersion: deploymentGVK.GroupVersion().String(), Metadata: policyv1.ObjectMetadata{ - Name: "*", + Name: "-", }, }, Compliant: string(policyv1.UnknownCompliancy), diff --git a/test/e2e/case38_install_operator_test.go b/test/e2e/case38_install_operator_test.go index 2f5ebdbd..3820afd0 100644 --- a/test/e2e/case38_install_operator_test.go +++ b/test/e2e/case38_install_operator_test.go @@ -135,7 +135,7 @@ var _ = Describe("Test installing an operator from OperatorPolicy", Ordered, fun Kind: "OperatorGroup", APIVersion: "operators.coreos.com/v1", Metadata: policyv1.ObjectMetadata{ - Name: "*", + Name: "-", Namespace: opPolTestNS, }, }, @@ -953,7 +953,7 @@ var _ = Describe("Test installing an operator from OperatorPolicy", Ordered, fun APIVersion: "operators.coreos.com/v1alpha1", Metadata: policyv1.ObjectMetadata{ Namespace: opPolTestNS, - Name: "*", + Name: "-", }, }, Compliant: "Compliant",