Skip to content

Commit 9e30cef

Browse files
authored
Correct the handling of images in different scenarios (#2268)
1 parent 83d75ed commit 9e30cef

File tree

4 files changed

+701
-39
lines changed

4 files changed

+701
-39
lines changed

e2e/fixtures/factory.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,26 +224,22 @@ func (factory *Factory) GetMainContainerOverrides(debugSymbols bool, unifiedImag
224224
image = factory.GetUnifiedFoundationDBImage()
225225
}
226226

227-
mainImage, tag := GetBaseImageAndTag(
228-
GetDebugImage(debugSymbols, image),
229-
)
227+
mainImage, tag := GetBaseImageAndTag(image)
230228

231229
return fdbv1beta2.ContainerOverrides{
232230
EnableTLS: false,
233-
ImageConfigs: factory.options.getImageVersionConfig(mainImage, tag, false),
231+
ImageConfigs: factory.options.getImageVersionConfig(mainImage, tag, false, debugSymbols),
234232
}
235233
}
236234

237235
// GetSidecarContainerOverrides will return the sidecar container overrides. If the unified image should be used an empty
238236
// container override will be returned.
239237
func (factory *Factory) GetSidecarContainerOverrides(debugSymbols bool) fdbv1beta2.ContainerOverrides {
240-
image, tag := GetBaseImageAndTag(
241-
GetDebugImage(debugSymbols, factory.GetSidecarImage()),
242-
)
238+
image, tag := GetBaseImageAndTag(factory.GetSidecarImage())
243239

244240
return fdbv1beta2.ContainerOverrides{
245241
EnableTLS: false,
246-
ImageConfigs: factory.options.getImageVersionConfig(image, tag, true),
242+
ImageConfigs: factory.options.getImageVersionConfig(image, tag, true, debugSymbols),
247243
}
248244
}
249245

e2e/fixtures/images.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,3 @@ func GetBaseImageAndTag(image string) (string, string) {
4343

4444
return parts[0], parts[1]
4545
}
46-
47-
// GetDebugImage returns the debugging image if enabled.
48-
func GetDebugImage(debug bool, image string) string {
49-
if debug && !strings.Contains(image, "-debug") {
50-
return image + "-debug"
51-
}
52-
53-
return image
54-
}

0 commit comments

Comments
 (0)