From 984203fbb03c4cb27471b1f34b11c36856c7ea7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Tue, 6 Aug 2024 14:40:39 +0200 Subject: [PATCH] fix(securityGroup): create group whit flag extraSecurityGroupRule --- controllers/osccluster_securitygroup_controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/osccluster_securitygroup_controller.go b/controllers/osccluster_securitygroup_controller.go index 2e5a99270..55b28bc00 100644 --- a/controllers/osccluster_securitygroup_controller.go +++ b/controllers/osccluster_securitygroup_controller.go @@ -297,8 +297,7 @@ func reconcileSecurityGroup(ctx context.Context, clusterScope *scope.ClusterScop securityGroupId := securityGroupsRef.ResourceMap[securityGroupName] if !Contains(securityGroupIds, securityGroupId) && tag == nil { - - if extraSecurityGroupRule { + if extraSecurityGroupRule && (len(securityGroupsRef.ResourceMap) == len(securityGroupsSpec)) { clusterScope.V(4).Info("Extra Security Group Rule activated") } else { clusterScope.V(2).Info("Create the desired securitygroup", "securityGroupName", securityGroupName)