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 ba57db3  fix: change prioritization of the insecure flag check to 
ensure it works with mixed secure/insecure registries
ba57db3 is described below

commit ba57db37d649e43cf11d1d0646494ccf2fbdad15
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue Mar 16 17:53:32 2021 +0100

    fix: change prioritization of the insecure flag check to ensure it works 
with mixed secure/insecure registries
---
 pkg/trait/builder.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index 635ce5b..d3a7773 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -270,7 +270,9 @@ func (t *builderTrait) buildahTask(e *Environment) 
(*v1.ImageTask, error) {
                        })
                }
                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 {
                bud = append(bud[:2], append([]string{"--tls-verify=false"}, 
bud[2:]...)...)
                push = append(push[:2], append([]string{"--tls-verify=false"}, 
push[2:]...)...)
        }

Reply via email to