Browse Source

bugfix: Looking in wrong place for upgrade options

Fixes a bug where Armada Was looking for upgrade options
(force, recreate_pods currently) underneath `upgrade` directly
rather than `upgrade.options` where they are defined in the schema.

Change-Id: Ia95129a19c87f5d59eaefccd04a7ac9e2acb0b3b
Sean Eagan 3 months ago
parent
commit
6f76f8bec7
2 changed files with 6 additions and 4 deletions
  1. 3
    2
      armada/handlers/chart_deploy.py
  2. 3
    2
      armada/tests/unit/handlers/test_armada.py

+ 3
- 2
armada/handlers/chart_deploy.py View File

@@ -121,8 +121,9 @@ class ChartDeploy(object):
121 121
 
122 122
             upgrade = chart.get('upgrade', {})
123 123
             disable_hooks = upgrade.get('no_hooks', False)
124
-            force = upgrade.get('force', False)
125
-            recreate_pods = upgrade.get('recreate_pods', False)
124
+            options = upgrade.get('options', {})
125
+            force = options.get('force', False)
126
+            recreate_pods = options.get('recreate_pods', False)
126 127
 
127 128
             if upgrade:
128 129
                 upgrade_pre = upgrade.get('pre', {})

+ 3
- 2
armada/tests/unit/handlers/test_armada.py View File

@@ -437,8 +437,9 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
437 437
                             if diff:
438 438
                                 upgrade = chart.get('upgrade', {})
439 439
                                 disable_hooks = upgrade.get('no_hooks', False)
440
-                                force = upgrade.get('force', False)
441
-                                recreate_pods = upgrade.get(
440
+                                options = upgrade.get('options', {})
441
+                                force = options.get('force', False)
442
+                                recreate_pods = options.get(
442 443
                                     'recreate_pods', False)
443 444
 
444 445
                                 expected_update_release_calls.append(

Loading…
Cancel
Save