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
The following commit(s) were added to refs/heads/master by this push: new 55f74d3 fix: ensure Kaniko build strategy works with insecure registries 55f74d3 is described below commit 55f74d3e44ad059219ec3d1fb00fb85ab2e60cd1 Author: Otavio Rodolfo Piske <opi...@redhat.com> AuthorDate: Mon Mar 15 16:23:02 2021 +0100 fix: ensure Kaniko build strategy works with insecure registries --- pkg/trait/builder.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 1c1c4df..635ce5b 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -342,9 +342,15 @@ func (t *builderTrait) kanikoTask(e *Environment) (*v1.ImageTask, error) { return nil, err } mountRegistrySecret(e.Platform.Status.Build.Registry.Secret, secret, &volumes, &volumeMounts, &env) - } else if e.Platform.Status.Build.Registry.Insecure { + } + + if e.Platform.Status.Build.Registry.Insecure { args = append(args, "--insecure") args = append(args, "--insecure-pull") + + // We use these 2 flags to force Kaniko to try HTTP instead of HTTPS + args = append(args, "--skip-tls-verify") + args = append(args, "--skip-tls-verify-pull") } env = append(env, proxySecretEnvVars(e)...)