Skip to content

Commit

Permalink
Change undetermined OperatorPolicy names to '-'
Browse files Browse the repository at this point in the history
Previously they were '*', but '-' might be more familiar to users.

Refs:
 - https://issues.redhat.com/browse/ACM-10202

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit c2a08b8)
  • Loading branch information
JustinKuli authored and magic-mirror-bot[bot] committed Feb 29, 2024
1 parent 0ddf2b5 commit 6536a8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/v1/configurationpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ type ObjectResource struct {
func ObjectResourceFromObj(obj client.Object) ObjectResource {
name := obj.GetName()
if name == "" {
name = "*"
name = "-"
}

return ObjectResource{
Expand Down
6 changes: 3 additions & 3 deletions controllers/operatorpolicy_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ func noInstallPlansObj(namespace string) policyv1.RelatedObject {
Kind: installPlanGVK.Kind,
APIVersion: installPlanGVK.GroupVersion().String(),
Metadata: policyv1.ObjectMetadata{
Name: "*",
Name: "-",
Namespace: namespace,
},
},
Expand Down Expand Up @@ -839,7 +839,7 @@ var noExistingCSVObj = policyv1.RelatedObject{
Kind: clusterServiceVersionGVK.Kind,
APIVersion: clusterServiceVersionGVK.GroupVersion().String(),
Metadata: policyv1.ObjectMetadata{
Name: "*",
Name: "-",
},
},
Compliant: string(policyv1.UnknownCompliancy),
Expand Down Expand Up @@ -886,7 +886,7 @@ var noExistingDeploymentObj = policyv1.RelatedObject{
Kind: deploymentGVK.Kind,
APIVersion: deploymentGVK.GroupVersion().String(),
Metadata: policyv1.ObjectMetadata{
Name: "*",
Name: "-",
},
},
Compliant: string(policyv1.UnknownCompliancy),
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/case38_install_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6536a8e

Please sign in to comment.