@@ -144,15 +144,15 @@ func getChannelHead(entries []declarativeconfig.ChannelEntry) (string, error) {
144
144
}
145
145
146
146
// handleTraditionalUpgrade upgrades an operator that was installed using OLM. Subsequent upgrades will go through the runFBCUpgrade function
147
- func handleTraditionalUpgrade (ctx context.Context , indexImage string , bundleImage string , channelName string ) (string , error ) {
147
+ func handleTraditionalUpgrade (ctx context.Context , indexImage string , bundleImage string , channelName string , skipTLSVerify bool , useHTTP bool ) (string , error ) {
148
148
// render the index image
149
- originalDeclCfg , err := fbcutil .RenderRefs (ctx , []string {indexImage })
149
+ originalDeclCfg , err := fbcutil .RenderRefs (ctx , []string {indexImage }, skipTLSVerify , useHTTP )
150
150
if err != nil {
151
151
return "" , fmt .Errorf ("error rendering index %q" , indexImage )
152
152
}
153
153
154
154
// render the bundle image
155
- bundleDeclConfig , err := fbcutil .RenderRefs (ctx , []string {bundleImage })
155
+ bundleDeclConfig , err := fbcutil .RenderRefs (ctx , []string {bundleImage }, skipTLSVerify , useHTTP )
156
156
if err != nil {
157
157
return "" , fmt .Errorf ("error rendering bundle image %q" , bundleImage )
158
158
}
@@ -201,7 +201,7 @@ func (c *IndexImageCatalogCreator) runFBCUpgrade(ctx context.Context) error {
201
201
refs = append (refs , c .IndexImage )
202
202
}
203
203
204
- originalDeclcfg , err := fbcutil .RenderRefs (ctx , refs )
204
+ originalDeclcfg , err := fbcutil .RenderRefs (ctx , refs , c . SkipTLSVerify , c . UseHTTP )
205
205
if err != nil {
206
206
return err
207
207
}
@@ -215,7 +215,7 @@ func (c *IndexImageCatalogCreator) runFBCUpgrade(ctx context.Context) error {
215
215
}
216
216
217
217
// Adding the FBC "f" to the originalDeclcfg to generate a new FBC
218
- declcfg , err := upgradeFBC (ctx , f , originalDeclcfg )
218
+ declcfg , err := upgradeFBC (ctx , f , originalDeclcfg , c . SkipTLSVerify , c . UseHTTP )
219
219
if err != nil {
220
220
return fmt .Errorf ("error creating the upgraded FBC: %v" , err )
221
221
}
@@ -235,8 +235,8 @@ func (c *IndexImageCatalogCreator) runFBCUpgrade(ctx context.Context) error {
235
235
236
236
// upgradeFBC constructs a new File-Based Catalog from both the FBCContext object and the declarative config object. This function will check to see
237
237
// if the FBCContext object "f" is already present in the original declarative config.
238
- func upgradeFBC (ctx context.Context , f * fbcutil.FBCContext , originalDeclCfg * declarativeconfig.DeclarativeConfig ) (* declarativeconfig.DeclarativeConfig , error ) {
239
- declcfg , err := fbcutil .RenderRefs (ctx , f .Refs )
238
+ func upgradeFBC (ctx context.Context , f * fbcutil.FBCContext , originalDeclCfg * declarativeconfig.DeclarativeConfig , skipTLSVerify bool , useHTTP bool ) (* declarativeconfig.DeclarativeConfig , error ) {
239
+ declcfg , err := fbcutil .RenderRefs (ctx , f .Refs , skipTLSVerify , useHTTP )
240
240
if err != nil {
241
241
return nil , err
242
242
}
@@ -387,7 +387,7 @@ func (c IndexImageCatalogCreator) UpdateCatalog(ctx context.Context, cs *v1alpha
387
387
}
388
388
389
389
// Upgrading when installed traditionally by OLM
390
- upgradedFBC , err := handleTraditionalUpgrade (ctx , c .IndexImage , c .BundleImage , subscription .Spec .Channel )
390
+ upgradedFBC , err := handleTraditionalUpgrade (ctx , c .IndexImage , c .BundleImage , subscription .Spec .Channel , c . SkipTLSVerify , c . UseHTTP )
391
391
if err != nil {
392
392
return fmt .Errorf ("unable to upgrade bundle: %v" , err )
393
393
}
0 commit comments