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 2021/03/19 15:18:56 UTC
[camel-k] 10/13: fix: Add missing Name and WorkingDir fields to
Kaniko task container
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 34246c163122db1104d6ce0ccd59025e9db89efb
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Mar 18 17:54:48 2021 +0100
fix: Add missing Name and WorkingDir fields to Kaniko task container
---
pkg/controller/build/schedule_pod.go | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/pkg/controller/build/schedule_pod.go b/pkg/controller/build/schedule_pod.go
index 8876222..7277204 100644
--- a/pkg/controller/build/schedule_pod.go
+++ b/pkg/controller/build/schedule_pod.go
@@ -464,10 +464,13 @@ func (action *schedulePodAction) addKanikoTaskToPod(ctx context.Context, build *
}
container := corev1.Container{
- Image: fmt.Sprintf("gcr.io/kaniko-project/executor:v%s", defaults.KanikoVersion),
- Args: args,
- Env: env,
- VolumeMounts: volumeMounts,
+ Name: task.Name,
+ Image: fmt.Sprintf("gcr.io/kaniko-project/executor:v%s", defaults.KanikoVersion),
+ ImagePullPolicy: corev1.PullIfNotPresent,
+ Args: args,
+ Env: env,
+ WorkingDir: path.Join(builderDir, build.Name, builder.ContextDir),
+ VolumeMounts: volumeMounts,
}
// We may want to handle possible conflicts