From f244bb7856e65e697dfc6221521cf7a288ca307e Mon Sep 17 00:00:00 2001
From: Piotr Mrowczynski <piotr.mrowczynski@cern.ch>
Date: Wed, 4 Jul 2018 18:00:53 +0200
Subject: [PATCH] Change policy for image pulls to IfNotPresent

---
 examples/cluster-init-job.yaml         | 2 +-
 examples/public-eos-events-select.yaml | 2 +-
 examples/scalability-test-eos.yaml     | 2 +-
 examples/secure-eos-events-select.yaml | 2 +-
 examples/spark-pi-custom-s3.yaml       | 2 +-
 examples/spark-pi-deps.yaml            | 2 +-
 examples/spark-pi-schedule.yaml        | 2 +-
 examples/spark-pi.yaml                 | 2 +-
 examples/tpcds-datagen.yaml            | 2 +-
 examples/tpcds.yaml                    | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/examples/cluster-init-job.yaml b/examples/cluster-init-job.yaml
index 3c36b0a..bfb6f10 100644
--- a/examples/cluster-init-job.yaml
+++ b/examples/cluster-init-job.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.SparkPi
   mainApplicationFile: "local:///opt/spark/examples/jars/spark-service-examples.jar"
   arguments:
diff --git a/examples/public-eos-events-select.yaml b/examples/public-eos-events-select.yaml
index 2c58b71..8bef8c4 100644
--- a/examples/public-eos-events-select.yaml
+++ b/examples/public-eos-events-select.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.EventsSelect
   mainApplicationFile: "local:///opt/spark/examples/jars/spark-service-examples.jar"
   arguments:
diff --git a/examples/scalability-test-eos.yaml b/examples/scalability-test-eos.yaml
index 4eb8f8e..62a522d 100644
--- a/examples/scalability-test-eos.yaml
+++ b/examples/scalability-test-eos.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.DimuonReductionAODMultiDataset
   mainApplicationFile: <path-to>/spark-service-examples/target/scala-2.11/spark-service-examples_2.11-0.2.0.jar
   arguments:
diff --git a/examples/secure-eos-events-select.yaml b/examples/secure-eos-events-select.yaml
index 821dd8b..3ad5c4b 100644
--- a/examples/secure-eos-events-select.yaml
+++ b/examples/secure-eos-events-select.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.EventsSelect
   mainApplicationFile: "local:///opt/spark/examples/jars/spark-service-examples.jar"
   arguments:
diff --git a/examples/spark-pi-custom-s3.yaml b/examples/spark-pi-custom-s3.yaml
index e8722dc..5b05dcf 100644
--- a/examples/spark-pi-custom-s3.yaml
+++ b/examples/spark-pi-custom-s3.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.SparkPi
   mainApplicationFile: "<path-to>/spark-service-examples/target/scala-2.11/spark-service-examples_2.11-0.1.0.jar"
   deps:
diff --git a/examples/spark-pi-deps.yaml b/examples/spark-pi-deps.yaml
index fc2c1c5..f458afb 100644
--- a/examples/spark-pi-deps.yaml
+++ b/examples/spark-pi-deps.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.SparkPi
   mainApplicationFile: "<path-to>/spark-service-examples/target/scala-2.11/spark-service-examples_2.11-0.1.0.jar"
   deps:
diff --git a/examples/spark-pi-schedule.yaml b/examples/spark-pi-schedule.yaml
index 107602c..09e3ff3 100644
--- a/examples/spark-pi-schedule.yaml
+++ b/examples/spark-pi-schedule.yaml
@@ -26,7 +26,7 @@ spec:
     type: Scala
     mode: cluster
     image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-    imagePullPolicy: Always
+    imagePullPolicy: IfNotPresent
     mainClass: ch.cern.sparkrootapplications.examples.SparkPi
     mainApplicationFile: "local:///opt/spark/examples/jars/spark-service-examples.jar"
     driver:
diff --git a/examples/spark-pi.yaml b/examples/spark-pi.yaml
index 8712afd..f135e37 100644
--- a/examples/spark-pi.yaml
+++ b/examples/spark-pi.yaml
@@ -23,7 +23,7 @@ spec:
   type: Scala
   mode: cluster
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.sparkrootapplications.examples.SparkPi
   mainApplicationFile: "local:///opt/spark/examples/jars/spark-service-examples.jar"
   driver:
diff --git a/examples/tpcds-datagen.yaml b/examples/tpcds-datagen.yaml
index bb45a60..63d6d38 100644
--- a/examples/tpcds-datagen.yaml
+++ b/examples/tpcds-datagen.yaml
@@ -26,7 +26,7 @@ spec:
   mode: cluster
   # Use staging (tpcds image)
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s-staging:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.tpcds.DataGenTPCDS
   mainApplicationFile: <path-to>/spark-service-examples/target/scala-2.11/spark-service-examples_2.11-0.2.0.jar
   arguments:
diff --git a/examples/tpcds.yaml b/examples/tpcds.yaml
index 7fca7cf..8f67cdd 100644
--- a/examples/tpcds.yaml
+++ b/examples/tpcds.yaml
@@ -26,7 +26,7 @@ spec:
   mode: cluster
   # Use staging (tpcds image)
   image: gitlab-registry.cern.ch/db/spark-service/docker-registry/spark-on-k8s-staging:v2.4.0
-  imagePullPolicy: Always
+  imagePullPolicy: IfNotPresent
   mainClass: ch.cern.tpcds.BenchmarkSparkSQL
   mainApplicationFile: <path-to>/spark-service-examples/target/scala-2.11/spark-service-examples_2.11-0.2.0.jar
   arguments:
-- 
GitLab