Browse Source

Merge "tiller: Remove unused params from delete_resources"

Zuul 5 months ago
parent
commit
a64d435de8
1 changed files with 8 additions and 18 deletions
  1. 8
    18
      armada/handlers/tiller.py

+ 8
- 18
armada/handlers/tiller.py View File

@@ -327,12 +327,7 @@ class Tiller(object):
327 327
                 labels = action.get('labels', None)
328 328
 
329 329
                 self.delete_resources(
330
-                    release_name,
331
-                    name,
332
-                    action_type,
333
-                    labels,
334
-                    namespace,
335
-                    timeout=timeout)
330
+                    action_type, labels, namespace, timeout=timeout)
336 331
         except Exception:
337 332
             LOG.excpetion(
338 333
                 "Pre-action failure: could not delete %(res_type)s "
@@ -620,21 +615,18 @@ class Tiller(object):
620 615
             raise ex.ReleaseException(release, status, 'Delete')
621 616
 
622 617
     def delete_resources(self,
623
-                         release_name,
624
-                         resource_name,
625 618
                          resource_type,
626 619
                          resource_labels,
627 620
                          namespace,
628 621
                          wait=False,
629 622
                          timeout=const.DEFAULT_TILLER_TIMEOUT):
630 623
         '''
631
-        :param release_name: release name the specified resource is under
632
-        :param resource_name: name of specific resource
633
-        :param resource_type: type of resource e.g. job, pod, etc.
634
-        :param resource_labels: labels by which to identify the resource
635
-        :param namespace: namespace of the resource
624
+        Delete resources matching provided resource type, labels, and
625
+        namespace.
636 626
 
637
-        Apply deletion logic based on type of resource
627
+        :param resource_type: type of resource e.g. job, pod, etc.
628
+        :param resource_labels: labels for selecting the resources
629
+        :param namespace: namespace of resources
638 630
         '''
639 631
         timeout = self._check_timeout(wait, timeout)
640 632
 
@@ -709,8 +701,8 @@ class Tiller(object):
709 701
             handled = True
710 702
 
711 703
         if not handled:
712
-            LOG.error("Unable to execute name: %s type: %s ", resource_name,
713
-                      resource_type)
704
+            LOG.error('No resources found with labels=%s type=%s namespace=%s',
705
+                      resource_labels, resource_type, namespace)
714 706
 
715 707
     def rolling_upgrade_pod_deployment(self,
716 708
                                        name,
@@ -759,8 +751,6 @@ class Tiller(object):
759 751
 
760 752
                     # delete pods
761 753
                     self.delete_resources(
762
-                        release_name,
763
-                        name,
764 754
                         'pod',
765 755
                         resource_labels,
766 756
                         namespace,

Loading…
Cancel
Save