Skip to content

Commit 8990b2b

Browse files
committed
Only check the owner of the service account if the service account has owner
1 parent a3dfaba commit 8990b2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/operators/olm/requirements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (a *Operator) permissionStatus(strategyDetailsDeployment *v1alpha1.Strategy
273273
}
274274

275275
// Check if the ServiceAccount is owned by CSV
276-
if !ownerutil.IsOwnedBy(sa, csv) {
276+
if len(sa.GetOwnerReferences()) != 0 && !ownerutil.IsOwnedBy(sa, csv) {
277277
met = false
278278
status.Status = v1alpha1.RequirementStatusReasonPresentNotSatisfied
279279
status.Message = "Service account is not owned by this ClusterServiceVersion"

0 commit comments

Comments
 (0)