Skip to content

Commit

Permalink
Merge "tiller: Remove unused params from delete_resources"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Nov 14, 2018
2 parents 9a92abe + 5cafd02 commit a64d435
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions armada/handlers/tiller.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,7 @@ def _pre_update_actions(self, actions, release_name, namespace, chart,
labels = action.get('labels', None)

self.delete_resources(
release_name,
name,
action_type,
labels,
namespace,
timeout=timeout)
action_type, labels, namespace, timeout=timeout)
except Exception:
LOG.excpetion(
"Pre-action failure: could not delete %(res_type)s "
Expand Down Expand Up @@ -620,21 +615,18 @@ def uninstall_release(self, release, disable_hooks=False, purge=True):
raise ex.ReleaseException(release, status, 'Delete')

def delete_resources(self,
release_name,
resource_name,
resource_type,
resource_labels,
namespace,
wait=False,
timeout=const.DEFAULT_TILLER_TIMEOUT):
'''
:param release_name: release name the specified resource is under
:param resource_name: name of specific resource
:param resource_type: type of resource e.g. job, pod, etc.
:param resource_labels: labels by which to identify the resource
:param namespace: namespace of the resource
Delete resources matching provided resource type, labels, and
namespace.
Apply deletion logic based on type of resource
:param resource_type: type of resource e.g. job, pod, etc.
:param resource_labels: labels for selecting the resources
:param namespace: namespace of resources
'''
timeout = self._check_timeout(wait, timeout)

Expand Down Expand Up @@ -709,8 +701,8 @@ def delete_resources(self,
handled = True

if not handled:
LOG.error("Unable to execute name: %s type: %s ", resource_name,
resource_type)
LOG.error('No resources found with labels=%s type=%s namespace=%s',
resource_labels, resource_type, namespace)

def rolling_upgrade_pod_deployment(self,
name,
Expand Down Expand Up @@ -759,8 +751,6 @@ def rolling_upgrade_pod_deployment(self,

# delete pods
self.delete_resources(
release_name,
name,
'pod',
resource_labels,
namespace,
Expand Down

0 comments on commit a64d435

Please sign in to comment.