fix(build): Default to routine build strategy for local IntegrationPlatform
@@ -76,23 +76,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPl
}
if p.Status.Build.BuildStrategy == "" {
- operatorIsLocal := !IsCurrentOperatorGlobal()
- // Local operators build in the same namespace by definition
- buildInDifferentNamespace := !operatorIsLocal
- if !operatorIsLocal {
- // Unless it's a global operator using a globally shared integration platform
- buildInDifferentNamespace = p.Namespace != GetOperatorNamespace()
- }
-
- // If the operator and the build are in different namespaces, pod strategy should be used (except for Spectrum)
- if buildInDifferentNamespace {
- if p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategySpectrum {
- p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyRoutine
- } else {
- p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyPod
- }
- } else {
- // Same-namespace builds use the fastest strategy that they support (routine when possible)
+ // Use the fastest strategy that they support (routine when possible)
if p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyS2I ||
p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategySpectrum {
p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyRoutine
@@ -101,7 +85,6 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPl
p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyPod
}
}
- }
err := setPlatformDefaults(ctx, c, p, verbose)
if err != nil {
