diff --git a/pkg/webhookconfig/common.go b/pkg/webhookconfig/common.go index 3351254323..863f8bc7fd 100644 --- a/pkg/webhookconfig/common.go +++ b/pkg/webhookconfig/common.go @@ -77,7 +77,7 @@ func (wrc *Register) constructOwner() v1.OwnerReference { } func (wrc *Register) GetKubePolicyClusterRoleName() (*unstructured.Unstructured, error) { - clusterRoles, err := wrc.client.ListResource(config.ClusterRoleAPIVersion, config.ClusterRoleKind, "", &v1.LabelSelector{MatchLabels: map[string]string{"app": "kyverno"}}) + clusterRoles, err := wrc.client.ListResource(config.ClusterRoleAPIVersion, config.ClusterRoleKind, "", &v1.LabelSelector{MatchLabels: map[string]string{"app.kubernetes.io/name": "kyverno"}}) if err != nil { return nil, err }