From 143dd5eecc3667929a73ecd76d18a530f4d05059 Mon Sep 17 00:00:00 2001 From: Proskurin Kirill Date: Tue, 15 Nov 2016 17:58:42 +0000 Subject: [PATCH] Force imagePullPolicy to Always Right now it's defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Which very confusing, especialy if you switch from :latest to some tag and wonder why your images are not updated. Change-Id: I2cdc0817c2b4e8c95993b5eae44ffff26acd7662 --- fuel_ccp/templates.py | 1 + fuel_ccp/tests/test_templates.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/fuel_ccp/templates.py b/fuel_ccp/templates.py index c6fbf5b1..fcd50a75 100644 --- a/fuel_ccp/templates.py +++ b/fuel_ccp/templates.py @@ -119,6 +119,7 @@ def serialize_daemon_container_spec(container): cont_spec = { "name": container["name"], "image": images.image_spec(container["image"]), + "imagePullPolicy": "Always", "command": _get_start_cmd(container["name"]), "volumeMounts": serialize_volume_mounts(container), "readinessProbe": { diff --git a/fuel_ccp/tests/test_templates.py b/fuel_ccp/tests/test_templates.py index b5785065..7f536a93 100644 --- a/fuel_ccp/tests/test_templates.py +++ b/fuel_ccp/tests/test_templates.py @@ -8,6 +8,7 @@ class TestDeploy(base.TestCase): container = { "name": "name_foo", "image": "image_foo", + "imagePullPolicy": "Always", "command": "command_foo", "cm_version": 1, "env": [{ @@ -29,6 +30,7 @@ class TestDeploy(base.TestCase): expected = { "name": "name_foo", "image": "ccp/image_foo:latest", + "imagePullPolicy": "Always", "command": [ "dumb-init", "/usr/bin/python",