You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2019/08/13 14:35:33 UTC
[camel-k] branch master updated (37d688c -> 07e87c3)
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.
from 37d688c Added unit tests for the jolokia trait #255
new 47e60f5 fix: Use restart policy OnFailure for Kaniko cache warmer
new 07e87c3 fix: Enable proxy server to be configured for Kaniko builds
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../camel/v1alpha1/integrationplatform_types.go | 1 +
pkg/builder/kaniko/publisher.go | 40 ++++++++++++++++++++++
pkg/cmd/install.go | 7 ++++
pkg/controller/integrationplatform/kaniko_cache.go | 2 +-
4 files changed, 49 insertions(+), 1 deletion(-)
[camel-k] 01/02: fix: Use restart policy OnFailure for Kaniko cache
warmer
Posted by as...@apache.org.
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 47e60f50c5d8f42f04bad86aecb774e1fab78967
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Aug 13 09:25:15 2019 +0100
fix: Use restart policy OnFailure for Kaniko cache warmer
fixes #736
fixes #898
---
pkg/controller/integrationplatform/kaniko_cache.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/controller/integrationplatform/kaniko_cache.go b/pkg/controller/integrationplatform/kaniko_cache.go
index 49958d1..6b7ba5f 100644
--- a/pkg/controller/integrationplatform/kaniko_cache.go
+++ b/pkg/controller/integrationplatform/kaniko_cache.go
@@ -83,7 +83,7 @@ func createKanikoCacheWarmerPod(ctx context.Context, client client.Client, platf
},
},
},
- RestartPolicy: corev1.RestartPolicyNever,
+ RestartPolicy: corev1.RestartPolicyOnFailure,
Volumes: []corev1.Volume{
{
Name: "camel-k-builder",
[camel-k] 02/02: fix: Enable proxy server to be configured for
Kaniko builds
Posted by as...@apache.org.
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 07e87c38caef957a5e4d43b4b755f7d8685ab902
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Aug 13 09:27:47 2019 +0100
fix: Enable proxy server to be configured for Kaniko builds
fixes #899
---
.../camel/v1alpha1/integrationplatform_types.go | 1 +
pkg/builder/kaniko/publisher.go | 40 ++++++++++++++++++++++
pkg/cmd/install.go | 7 ++++
3 files changed, 48 insertions(+)
diff --git a/pkg/apis/camel/v1alpha1/integrationplatform_types.go b/pkg/apis/camel/v1alpha1/integrationplatform_types.go
index 9a1e047..19dbcab 100644
--- a/pkg/apis/camel/v1alpha1/integrationplatform_types.go
+++ b/pkg/apis/camel/v1alpha1/integrationplatform_types.go
@@ -104,6 +104,7 @@ type IntegrationPlatformBuildSpec struct {
Timeout metav1.Duration `json:"timeout,omitempty"`
PersistentVolumeClaim string `json:"persistentVolumeClaim,omitempty"`
Maven MavenSpec `json:"maven,omitempty"`
+ HTTPProxySecret string `json:"httpProxySecret,omitempty"`
}
// IntegrationPlatformRegistrySpec --
diff --git a/pkg/builder/kaniko/publisher.go b/pkg/builder/kaniko/publisher.go
index 4e798ea..1951f5b 100644
--- a/pkg/builder/kaniko/publisher.go
+++ b/pkg/builder/kaniko/publisher.go
@@ -111,6 +111,46 @@ func publisher(ctx *builder.Context) error {
args = baseArgs
}
+ if ctx.Build.Platform.Build.HTTPProxySecret != "" {
+ optional := true
+ envs = append(envs, corev1.EnvVar{
+ Name: "HTTP_PROXY",
+ ValueFrom: &corev1.EnvVarSource{
+ SecretKeyRef: &corev1.SecretKeySelector{
+ LocalObjectReference: corev1.LocalObjectReference{
+ Name: ctx.Build.Platform.Build.HTTPProxySecret,
+ },
+ Key: "HTTP_PROXY",
+ Optional: &optional,
+ },
+ },
+ })
+ envs = append(envs, corev1.EnvVar{
+ Name: "HTTPS_PROXY",
+ ValueFrom: &corev1.EnvVarSource{
+ SecretKeyRef: &corev1.SecretKeySelector{
+ LocalObjectReference: corev1.LocalObjectReference{
+ Name: ctx.Build.Platform.Build.HTTPProxySecret,
+ },
+ Key: "HTTPS_PROXY",
+ Optional: &optional,
+ },
+ },
+ })
+ envs = append(envs, corev1.EnvVar{
+ Name: "NO_PROXY",
+ ValueFrom: &corev1.EnvVarSource{
+ SecretKeyRef: &corev1.SecretKeySelector{
+ LocalObjectReference: corev1.LocalObjectReference{
+ Name: ctx.Build.Platform.Build.HTTPProxySecret,
+ },
+ Key: "NO_PROXY",
+ Optional: &optional,
+ },
+ },
+ })
+ }
+
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
APIVersion: corev1.SchemeGroupVersion.String(),
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 166b862..25e94b3 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -74,6 +74,8 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) *cobra.Command {
cmd.Flags().StringVar(&impl.buildStrategy, "build-strategy", "", "Set the build strategy")
cmd.Flags().StringVar(&impl.buildTimeout, "build-timeout", "", "Set how long the build process can last")
cmd.Flags().StringVar(&impl.traitProfile, "trait-profile", "", "The profile to use for traits")
+ cmd.Flags().StringVar(&impl.httpProxySecret, "http-proxy-secret", "", "Configure the source of the secret holding HTTP proxy server details "+
+ "(HTTP_PROXY|HTTPS_PROXY|NO_PROXY)")
// maven settings
cmd.Flags().StringVar(&impl.localRepository, "local-repository", "", "Location of the local maven repository")
@@ -114,6 +116,7 @@ type installCmdOptions struct {
kits []string
registry v1alpha1.IntegrationPlatformRegistrySpec
traitProfile string
+ httpProxySecret string
}
// nolint: gocyclo
@@ -228,6 +231,10 @@ func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
platform.Spec.Build.Maven.Settings = mavenSettings
}
+ if o.httpProxySecret != "" {
+ platform.Spec.Build.HTTPProxySecret = o.httpProxySecret
+ }
+
platform.Spec.Resources.Kits = o.kits
err = install.RuntimeObjectOrCollect(o.Context, c, namespace, collection, platform)