@@ -278,23 +278,25 @@ func (b *Bootstrap) InitResources(instance *apiv3.CommonService, forceUpdateODLM
278278 if err := b .waitResourceReady (constant .OpregAPIGroupVersion , constant .OpconKind ); err != nil {
279279 return err
280280 }
281- // Reinstall/update OperandRegistry and OperandConfig if not installed/updated in the previous step
282- if ! existOpreg || ! existOpcon || forceUpdateODLMCRs {
281+ if os .Getenv ("NO_OLM" ) != "true" {
282+ // Reinstall/update OperandRegistry and OperandConfig if not installed/updated in the previous step
283+ if ! existOpreg || ! existOpcon || forceUpdateODLMCRs {
283284
284- // Set "Pending" condition when creating OperandRegistry and OperandConfig
285- instance .SetPendingCondition (constant .MasterCR , apiv3 .ConditionTypePending , corev1 .ConditionTrue , apiv3 .ConditionReasonInit , apiv3 .ConditionMessageInit )
286- if err := b .Client .Status ().Update (ctx , instance ); err != nil {
287- return err
288- }
285+ // Set "Pending" condition when creating OperandRegistry and OperandConfig
286+ instance .SetPendingCondition (constant .MasterCR , apiv3 .ConditionTypePending , corev1 .ConditionTrue , apiv3 .ConditionReasonInit , apiv3 .ConditionMessageInit )
287+ if err := b .Client .Status ().Update (ctx , instance ); err != nil {
288+ return err
289+ }
289290
290- klog .Info ("Installing/Updating OperandRegistry" )
291- if err := b .InstallOrUpdateOpreg (forceUpdateODLMCRs , installPlanApproval ); err != nil {
292- return err
293- }
291+ klog .Info ("Installing/Updating OperandRegistry" )
292+ if err := b .InstallOrUpdateOpreg (forceUpdateODLMCRs , installPlanApproval ); err != nil {
293+ return err
294+ }
294295
295- klog .Info ("Installing/Updating OperandConfig" )
296- if err := b .InstallOrUpdateOpcon (forceUpdateODLMCRs ); err != nil {
297- return err
296+ klog .Info ("Installing/Updating OperandConfig" )
297+ if err := b .InstallOrUpdateOpcon (forceUpdateODLMCRs ); err != nil {
298+ return err
299+ }
298300 }
299301 }
300302 return nil
0 commit comments