feat: Add image pull policy when create KEDA connector deployments (#1944)

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
Jacob
2021-05-20 01:22:25 +05:30
committed by GitHub
co-authored by Vishal
parent 462b7d861d
commit d7ac0ee17a
3 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -393,6 +393,7 @@ func getDeploymentSpec(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClien
}
imageName := fmt.Sprintf("%s_image", string(mqt.Spec.MessageQueueType))
image := os.Getenv(strings.ToUpper(imageName))
imagePullPolicy := utils.GetImagePullPolicy(os.Getenv("CONNECTOR_IMAGE_PULL_POLICY"))
blockOwnerDeletion := true
return &appsv1.Deployment{
@@ -428,7 +429,7 @@ func getDeploymentSpec(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClien
{
Name: mqt.ObjectMeta.Name,
Image: image,
ImagePullPolicy: "Always",
ImagePullPolicy: imagePullPolicy,
Env: envVars,
},
},