Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reconciliation will tolerate both opt.channel and opt.FallbackChannel…
…s for one operator

Signed-off-by: Daniel Fan <[email protected]>
  • Loading branch information
Daniel-Fan committed Nov 18, 2024
commit 7f905c69280263f30c9c568e1e5206dcb0f125a4
5 changes: 4 additions & 1 deletion controllers/operandrequest/reconcile_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@ func (r *Reconciler) reconcileSubscription(ctx context.Context, requestInstance
sub.Spec.Channel = minChannel
}

channels := []string{opt.Channel}
if channels = append(channels, opt.FallbackChannels...); util.Contains(channels, sub.Spec.Channel) {
isMatchedChannel = true
}
// update the spec iff channel in sub matches channel
if sub.Spec.Channel == opt.Channel {
isMatchedChannel = true
sub.Spec.CatalogSource = opt.SourceName
sub.Spec.CatalogSourceNamespace = opt.SourceNamespace
sub.Spec.Package = opt.PackageName
Expand Down