[v2 docs] Move `upgrade.no_hooks` to `upgrade.options.no_hooks`
This is just a basic Helm CLI option, so this moves it to be alongside the rest of the upgrade options. Change-Id: I4cbb4f3bfe60240d793a30f7a7d58705024f633c
This commit is contained in:
parent
65e292b93e
commit
235509f210
|
@ -21,6 +21,7 @@ from armada.exceptions import armada_exceptions
|
|||
from armada.handlers.chartbuilder import ChartBuilder
|
||||
from armada.handlers.release_diff import ReleaseDiff
|
||||
from armada.handlers.chart_delete import ChartDelete
|
||||
from armada.handlers.schema import get_schema_info
|
||||
from armada.handlers.test import Test
|
||||
from armada.handlers.wait import ChartWait
|
||||
from armada.exceptions import tiller_exceptions
|
||||
|
@ -92,8 +93,16 @@ class ChartDeploy(object):
|
|||
old_values_string = old_release.config.raw
|
||||
|
||||
upgrade = chart.get('upgrade', {})
|
||||
disable_hooks = upgrade.get('no_hooks', False)
|
||||
options = upgrade.get('options', {})
|
||||
|
||||
# TODO: Remove when v1 doc support is removed.
|
||||
schema_info = get_schema_info(ch['schema'])
|
||||
if schema_info.version < 2:
|
||||
no_hooks_location = upgrade
|
||||
else:
|
||||
no_hooks_location = options
|
||||
|
||||
disable_hooks = no_hooks_location.get('no_hooks', False)
|
||||
force = options.get('force', False)
|
||||
recreate_pods = options.get('recreate_pods', False)
|
||||
|
||||
|
|
|
@ -126,8 +126,6 @@ data:
|
|||
upgrade:
|
||||
type: object
|
||||
properties:
|
||||
no_hooks:
|
||||
type: boolean
|
||||
pre:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
@ -141,6 +139,8 @@ data:
|
|||
type: boolean
|
||||
recreate_pods:
|
||||
type: boolean
|
||||
no_hooks:
|
||||
type: boolean
|
||||
additionalProperties: false
|
||||
additionalProperties: false
|
||||
required:
|
||||
|
|
|
@ -48,8 +48,11 @@ Chart
|
|||
| with ``type: job`` no longer | ``type: job`` and you also want to delete cronjobs, add |
|
||||
| deletes cronjobs | another item with ``type: cronjob`` and same labels. |
|
||||
+--------------------------------+------------------------------------------------------------+
|
||||
| ``upgrade.no_hooks`` moved to | Remove as desired, otherwise move to the new location. |
|
||||
| ``upgrade.options.no_hooks``, | |
|
||||
| and now optional | |
|
||||
+--------------------------------+------------------------------------------------------------+
|
||||
| ``dependencies``, | Remove as desired. |
|
||||
| ``upgrade.no_hooks``, | |
|
||||
| ``source.subpath`` | |
|
||||
| now optional | |
|
||||
+--------------------------------+------------------------------------------------------------+
|
||||
|
|
|
@ -113,7 +113,7 @@ Chart
|
|||
+-----------------+----------+---------------------------------------------------------------------------------------+
|
||||
| test | object | See Test_. |
|
||||
+-----------------+----------+---------------------------------------------------------------------------------------+
|
||||
| upgrade | object | upgrade the chart managed by the armada yaml |
|
||||
| upgrade | object | See Upgrade_. |
|
||||
+-----------------+----------+---------------------------------------------------------------------------------------+
|
||||
| delete | object | See Delete_. |
|
||||
+-----------------+----------+---------------------------------------------------------------------------------------+
|
||||
|
@ -190,14 +190,14 @@ Run helm tests on the chart after install/upgrade.
|
|||
setting the ``enabled`` key to ``False``.
|
||||
|
||||
Test Options
|
||||
^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Test options to pass through directly to helm.
|
||||
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
+=============+==========+===============================================================+
|
||||
| cleanup | bool | cleanup test pods after test completion, defaults to false |
|
||||
| cleanup | bool | Same as Helm CLI. |
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
@ -212,26 +212,43 @@ Test options to pass through directly to helm.
|
|||
running tests. Similar suggestions have been made for how ``helm test --cleanup`` itself
|
||||
ought to work (https://github.com/helm/helm/issues/3279).
|
||||
|
||||
Upgrade
|
||||
^^^^^^^
|
||||
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
+=============+==========+===============================================================+
|
||||
| options | object | See `Upgrade - Options`_. |
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| pre | object | See `Upgrade - Pre`_. |
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
|
||||
Upgrade - Options
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Upgrade options to pass through directly to helm.
|
||||
|
||||
+---------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
+===============+==========+===============================================================+
|
||||
| no_hooks | boolean | Same as Helm CLI. |
|
||||
+---------------+----------+---------------------------------------------------------------+
|
||||
| force | boolean | Same as Helm CLI. |
|
||||
+---------------+----------+---------------------------------------------------------------+
|
||||
| recreate_pods | boolean | Same as Helm CLI. |
|
||||
+---------------+----------+---------------------------------------------------------------+
|
||||
|
||||
Upgrade - Pre
|
||||
^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
+=============+==========+===============================================================+
|
||||
| pre | object | actions performed prior to updating a release |
|
||||
| delete | array | List of `Upgrade - Pre - Delete`_. |
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
|
||||
Upgrade - Actions
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
+=============+==========+===============================================================+
|
||||
| delete | array | List of `Upgrade - Actions - Delete`_. |
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
|
||||
Upgrade - Actions - Delete
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Upgrade - Pre - Delete
|
||||
**********************
|
||||
|
||||
+-------------+----------+---------------------------------------------------------------+
|
||||
| keyword | type | action |
|
||||
|
@ -243,7 +260,7 @@ Upgrade - Actions - Delete
|
|||
+-------------+----------+---------------------------------------------------------------+
|
||||
|
||||
Chart Example
|
||||
^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
|
|
Loading…
Reference in New Issue