We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d803f commit 684d583Copy full SHA for 684d583
controllers/argoutil/resource.go
@@ -272,9 +272,17 @@ func GetImagePullPolicy(policy *corev1.PullPolicy) corev1.PullPolicy {
272
return *policy
273
}
274
275
- if envValue := os.Getenv(common.ArgoCDImagePullPolicyEnvName); envValue != "" {
276
- return corev1.PullPolicy(envValue)
277
- }
+ envValue := os.Getenv(common.ArgoCDImagePullPolicyEnvName)
+
+ switch envValue {
278
+ case "Always":
279
+ return corev1.PullAlways
280
+ case "IfNotPresent":
281
+ return corev1.PullIfNotPresent
282
+ case "Never":
283
+ return corev1.PullNever
284
+ default:
285
+ return corev1.PullPolicy("IfNotPresent")
286
- return corev1.PullPolicy(common.DefaultImagePullPolicy)
287
+ }
288
0 commit comments