fix(tiller): pre-delete-actions
- selecting when to wait for redeployment Change-Id: Ie7746443946ec05c6a4daaca07cfc741b9194de9
This commit is contained in:
parent
7b26e59422
commit
1a0c33c818
@ -467,7 +467,7 @@ class Tiller(object):
|
|||||||
self.uninstall_release(chart)
|
self.uninstall_release(chart)
|
||||||
|
|
||||||
def delete_resources(self, release_name, resource_name, resource_type,
|
def delete_resources(self, release_name, resource_name, resource_type,
|
||||||
resource_labels, namespace):
|
resource_labels, namespace, wait=False):
|
||||||
'''
|
'''
|
||||||
:params release_name - release name the specified resource is under
|
:params release_name - release name the specified resource is under
|
||||||
:params resource_name - name of specific resource
|
:params resource_name - name of specific resource
|
||||||
@ -498,6 +498,7 @@ class Tiller(object):
|
|||||||
pod_name = pod.metadata.name
|
pod_name = pod.metadata.name
|
||||||
LOG.info("Deleting %s in namespace: %s", pod_name, namespace)
|
LOG.info("Deleting %s in namespace: %s", pod_name, namespace)
|
||||||
self.k8s.delete_namespace_pod(pod_name, namespace)
|
self.k8s.delete_namespace_pod(pod_name, namespace)
|
||||||
|
if wait:
|
||||||
self.k8s.wait_for_pod_redeployment(pod_name, namespace)
|
self.k8s.wait_for_pod_redeployment(pod_name, namespace)
|
||||||
else:
|
else:
|
||||||
LOG.error("Unable to execute name: %s type: %s ",
|
LOG.error("Unable to execute name: %s type: %s ",
|
||||||
@ -542,8 +543,9 @@ class Tiller(object):
|
|||||||
namespace=namespace, template=template)
|
namespace=namespace, template=template)
|
||||||
|
|
||||||
# delete pods
|
# delete pods
|
||||||
self.delete_resources(release_name, name, 'pod',
|
self.delete_resources(
|
||||||
resource_labels, namespace)
|
release_name, name, 'pod', resource_labels, namespace,
|
||||||
|
wait=True)
|
||||||
|
|
||||||
elif action_type == 'statefulset':
|
else:
|
||||||
pass
|
LOG.error("Unable to exectue name: % type: %s", name, action_type)
|
||||||
|
@ -23,6 +23,7 @@ data:
|
|||||||
chart_name: mariadb
|
chart_name: mariadb
|
||||||
release: mariadb
|
release: mariadb
|
||||||
namespace: openstack
|
namespace: openstack
|
||||||
|
timeout: 3600
|
||||||
wait:
|
wait:
|
||||||
timeout: 3600
|
timeout: 3600
|
||||||
labels:
|
labels:
|
||||||
@ -48,6 +49,7 @@ data:
|
|||||||
chart_name: memcached
|
chart_name: memcached
|
||||||
release: memcached
|
release: memcached
|
||||||
namespace: openstack
|
namespace: openstack
|
||||||
|
timeout: 100
|
||||||
wait:
|
wait:
|
||||||
timeout: 100
|
timeout: 100
|
||||||
labels:
|
labels:
|
||||||
@ -74,6 +76,7 @@ data:
|
|||||||
test: true
|
test: true
|
||||||
release: keystone
|
release: keystone
|
||||||
namespace: openstack
|
namespace: openstack
|
||||||
|
timeout: 100
|
||||||
wait:
|
wait:
|
||||||
timeout: 100
|
timeout: 100
|
||||||
labels:
|
labels:
|
||||||
@ -87,8 +90,8 @@ data:
|
|||||||
- name: keystone-bootstrap
|
- name: keystone-bootstrap
|
||||||
type: job
|
type: job
|
||||||
labels:
|
labels:
|
||||||
- application: keystone
|
application: keystone
|
||||||
- component: bootstrap
|
component: bootstrap
|
||||||
values:
|
values:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
source:
|
source:
|
||||||
|
Loading…
Reference in New Issue
Block a user