From c8facac8b67176e61ab2e00b312cc2deafe57b79 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 18 Jul 2018 12:02:58 +0100 Subject: Add "imagePullPolicy" parameter in Kubernetes container The configuration parameter "imagePullPolicy" defines how Kubernetes retrieves de image. By default, Kubernetes will always try to pull the latest image from the repository [1]. Three possible arguments are accepted: - Always - IfNotPresent - Never Example of Kubernetes pod definition: containers: - name: vcmts-pktgen-pod-0 image: openretriever/yardstick imagePullPolicy: IfNotPresent Example of Yardstick definition: context: name: k8syardstick type: Kubernetesservers: vnf: image: openretriever/yardstick imagePullPolicy: IfNotPresent [1] https://kubernetes.io/docs/concepts/containers/images/ JIRA: YARDSTICK-1328 Change-Id: I83bfb01670eef22218b1affd7d37af14e32a622e Signed-off-by: Rodolfo Alonso Hernandez --- yardstick/common/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yardstick/common') diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py index c25acbaf8..51db552ee 100644 --- a/yardstick/common/exceptions.py +++ b/yardstick/common/exceptions.py @@ -253,6 +253,10 @@ class KubernetesContainerPortNotDefined(YardstickException): message = 'Container port not defined in "%(port)s"' +class KubernetesContainerWrongImagePullPolicy(YardstickException): + message = 'Image pull policy must be "Always", "IfNotPresent" or "Never"' + + class ScenarioCreateNetworkError(YardstickException): message = 'Create Neutron Network Scenario failed' -- cgit 1.2.3-korg