Skip to content

Commit 591c002

Browse files
committed
fix(operatorgroup): don't overwrite operatorgroup annotations on copied
csvs. these annotations are used to calculate gc graphs and overwriting them causes copied csvs to be left behind if they land in a target ns that has another operatorgroup in it.
1 parent 8159d0d commit 591c002

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/controller/operators/olm/operatorgroup.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ func (a *Operator) annotateCSVs(group *v1.OperatorGroup, targetNamespaces []stri
183183
targetNamespaceSet := resolver.NewNamespaceSet(targetNamespaces)
184184

185185
for _, csv := range a.csvSet(group.GetNamespace(), v1alpha1.CSVPhaseAny) {
186+
if csv.IsCopied() {
187+
continue
188+
}
186189
logger := logger.WithField("csv", csv.GetName())
187190

188191
originalNamespacesAnnotation, _ := a.copyOperatorGroupAnnotations(&csv.ObjectMeta)[v1.OperatorGroupTargetsAnnotationKey]

0 commit comments

Comments
 (0)