Allow imagePullPolicy to be upper case

This aligns with k8s pod which allows 'Always', 'Never', and
'IfNotPresent' as image pull policy.

Change-Id: I35f13eb4eb0f23dc6ca34df5fe4e4d06a3437054
This commit is contained in:
Hongbin Lu 2019-03-17 16:00:14 +00:00
parent df210e2204
commit 06f563dbe8
2 changed files with 4 additions and 1 deletions

View File

@ -243,6 +243,8 @@ class CapsuleController(base.Controller):
container_dict['memory'] = str(allocation['memory'])
container_dict.pop('resources')
container_dict['image_pull_policy'] = (
container_dict.get('image_pull_policy', 'always').lower())
container_dict['status'] = consts.CREATING
container_dict['interactive'] = True
container_dict['capsule_id'] = new_capsule.id

View File

@ -124,7 +124,8 @@ workdir = {
image_pull_policy = {
'type': ['string', 'null'],
'enum': ['never', 'always', 'ifnotpresent', None]
'enum': ['never', 'always', 'ifnotpresent',
'Never', 'Always', 'IfNotPresent', None]
}
labels = {