Skip to content

Commit b2d7bc1

Browse files
committed
Return if CM list is empty
1 parent 4515880 commit b2d7bc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/splunk/enterprise/clustermanager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,10 @@ func changeClusterManagerAnnotations(ctx context.Context, c splcommon.Controller
540540
return err
541541
}
542542

543+
if len(objectList.Items) == 0 {
544+
return nil
545+
}
546+
543547
// check if instance has the required LicenseManagerRef
544548
for _, cm := range objectList.Items {
545549
if cm.Spec.LicenseManagerRef.Name == cr.GetName() {

0 commit comments

Comments
 (0)