Enable pod update using pod_defintion_url
Change-Id: I6d24d144e33898b8b2038034ca3f7cb44dc54e9d
This commit is contained in:
parent
01e4d151e6
commit
bac58ab49b
|
@ -115,7 +115,13 @@ class KubeClient(object):
|
|||
def pod_update(contents):
|
||||
LOG.debug("pod_update contents %s" % contents)
|
||||
try:
|
||||
out, err = utils.trycmd('kubectl', 'update', '-f', contents)
|
||||
if contents.pod_definition_url:
|
||||
out, err = utils.trycmd('kubectl', 'update', '-f',
|
||||
contents.pod_definition_url)
|
||||
else:
|
||||
# TODO(jay-lau-513) Translate the contents to a json stdin
|
||||
out, err = utils.trycmd('echo contents | kubectl', 'update',
|
||||
'-f', '-')
|
||||
if err:
|
||||
return False
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue