Skip to content

Commit

Permalink
fix: Set clusterScope to true in vcpol controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-Wei committed Dec 4, 2024
1 parent 349f4c0 commit ef6c85b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/policy/clusterpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,10 @@ func (c *ClusterPolicyController) syncClusterPolicy(key string) error {
}

newPolicy := false
apName := varmorprofile.GenerateArmorProfileName(varmorconfig.Namespace, vcp.Name, false)
apName := varmorprofile.GenerateArmorProfileName(varmorconfig.Namespace, vcp.Name, true)
ap, err := c.varmorInterface.ArmorProfiles(varmorconfig.Namespace).Get(context.Background(), apName, metav1.GetOptions{})
if err == nil {
if policyOwnArmorProfile(vcp, ap, false) {
if policyOwnArmorProfile(vcp, ap, true) {
// VarmorClusterPolicy update event
logger.V(3).Info("processing VarmorClusterPolicy update event")
return c.handleUpdateVarmorClusterPolicy(vcp, ap)
Expand Down

0 comments on commit ef6c85b

Please sign in to comment.