This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 3f9cab433aa7d689f5fd271104c443a74054dc1a Author: Antonin Stefanutti <[email protected]> AuthorDate: Mon Dec 16 15:18:43 2019 +0100 fix(build): Disable Kaniko cache warming by default --- pkg/apis/camel/v1alpha1/integrationplatform_types_support.go | 4 ++-- pkg/cmd/install.go | 2 +- pkg/platform/defaults.go | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go b/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go index d85cc34..64f8209 100644 --- a/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go +++ b/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go @@ -181,8 +181,8 @@ func (in *IntegrationPlatformStatus) RemoveCondition(condType IntegrationPlatfor // IsKanikoCacheEnabled tells if the KanikoCache is enabled on the integration platform build spec func (b IntegrationPlatformBuildSpec) IsKanikoCacheEnabled() bool { if b.KanikoBuildCache == nil { - // Cache is enabled unless explicitly disabled - return true + // Cache is disabled by default + return false } return *b.KanikoBuildCache } diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go index 96289da..9519777 100644 --- a/pkg/cmd/install.go +++ b/pkg/cmd/install.go @@ -89,7 +89,7 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *installCmdO cmd.Flags().String("build-strategy", "", "Set the build strategy") cmd.Flags().String("build-timeout", "", "Set how long the build process can last") cmd.Flags().String("trait-profile", "", "The profile to use for traits") - cmd.Flags().Bool("kaniko-build-cache", true, "To enable or disable the Kaniko Cache in building phase") + cmd.Flags().Bool("kaniko-build-cache", false, "To enable or disable the Kaniko cache") cmd.Flags().String("http-proxy-secret", "", "Configure the source of the secret holding HTTP proxy server details "+ "(HTTP_PROXY|HTTPS_PROXY|NO_PROXY)") diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go index b637731..6d6849e 100644 --- a/pkg/platform/defaults.go +++ b/pkg/platform/defaults.go @@ -172,8 +172,10 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ } if p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.KanikoBuildCache == nil { - // Default to using Kaniko cache warmer - defaultKanikoBuildCache := true + // Default to disabling Kaniko cache warmer + // Using the cache warmer pod seems unreliable with the current Kaniko version + // and requires relying on a persistent volume. + defaultKanikoBuildCache := false p.Status.Build.KanikoBuildCache = &defaultKanikoBuildCache if verbose { log.Log.Infof("Kaniko cache set to %t", *p.Status.Build.KanikoBuildCache)
