From 29b3f6bfd96070596c91a3868c67e2a9cbe9000e Mon Sep 17 00:00:00 2001
From: odubajDT <ondrej.dubaj@dynatrace.com>
Date: Thu, 1 Jun 2023 14:31:54 +0200
Subject: [PATCH] chore(operator): explicitly define ImagePullPolicy of Job
 container to IfNotPresent

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
---
 operator/controllers/lifecycle/keptntask/js_builder.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/operator/controllers/lifecycle/keptntask/js_builder.go b/operator/controllers/lifecycle/keptntask/js_builder.go
index b6fb1083e8..de2d968b0a 100644
--- a/operator/controllers/lifecycle/keptntask/js_builder.go
+++ b/operator/controllers/lifecycle/keptntask/js_builder.go
@@ -36,8 +36,9 @@ type FunctionExecutionParams struct {
 
 func (js *JSBuilder) CreateContainerWithVolumes(ctx context.Context) (*corev1.Container, []corev1.Volume, error) {
 	container := corev1.Container{
-		Name:  "keptn-function-runner",
-		Image: os.Getenv("FUNCTION_RUNNER_IMAGE"),
+		Name:            "keptn-function-runner",
+		Image:           os.Getenv("FUNCTION_RUNNER_IMAGE"),
+		ImagePullPolicy: corev1.PullIfNotPresent,
 	}
 
 	var envVars []corev1.EnvVar