From 4b76fda6b41a7face9bcb2970d9bb8407c8fac45 Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Fri, 9 Nov 2018 22:05:05 +0000 Subject: [PATCH] Add warnings for post upgrade actions Armada does not perform post upgrade actions. This change adds a warning to the documentation, comments, and output. Change-Id: I4d37406e13a44759861ea179d06b26831efe2ac8 --- armada/handlers/chart_deploy.py | 2 ++ armada/schemas/armada-chart-schema.yaml | 2 ++ .../operations/guide-build-armada-yaml.rst | 19 +++++-------------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/armada/handlers/chart_deploy.py b/armada/handlers/chart_deploy.py index c7644dd8..ab6965d6 100644 --- a/armada/handlers/chart_deploy.py +++ b/armada/handlers/chart_deploy.py @@ -132,6 +132,8 @@ class ChartDeploy(object): pre_actions = upgrade_pre if not self.disable_update_post and upgrade_post: + LOG.warning('Post upgrade actions are ignored by Armada' + 'and will not affect deployment.') post_actions = upgrade_post try: diff --git a/armada/schemas/armada-chart-schema.yaml b/armada/schemas/armada-chart-schema.yaml index 37e16cfd..cde89215 100644 --- a/armada/schemas/armada-chart-schema.yaml +++ b/armada/schemas/armada-chart-schema.yaml @@ -146,6 +146,8 @@ data: $ref: '#/definitions/hook_action' create: $ref: '#/definitions/hook_action' + # TODO(drewwalters96): Armada ignores post-update actions. Remove them + # in future schemas. post: type: object additionalProperties: false diff --git a/doc/source/operations/guide-build-armada-yaml.rst b/doc/source/operations/guide-build-armada-yaml.rst index 936f27ee..65f6ac6f 100644 --- a/doc/source/operations/guide-build-armada-yaml.rst +++ b/doc/source/operations/guide-build-armada-yaml.rst @@ -208,17 +208,14 @@ Test options to pass through directly to helm. next upgrade. -Upgrade, Install - Pre or Post -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Upgrade - Pre +^^^^^^^^^^^^^ +-------------+----------+---------------------------------------------------------------+ | keyword | type | action | +=============+==========+===============================================================+ -| pre | object | actions prior to updating/installing chart | +| pre | object | actions performed prior to updating a release | +-------------+----------+---------------------------------------------------------------+ -| post | object | actions post updating/installing chart | -+-------------+----------+---------------------------------------------------------------+ - Upgrade - Actions ^^^^^^^^^^^^^^^^^ @@ -226,17 +223,11 @@ Upgrade - Actions +-------------+----------+---------------------------------------------------------------+ | keyword | type | action | +=============+==========+===============================================================+ -| update | object | updates daemonsets in pre update actions | +| update | object | update daemonsets in pre-upgrade update actions | +-------------+----------+---------------------------------------------------------------+ -| delete | sequence | delete jobs in pre delete actions and child pods | +| delete | sequence | delete jobs and pods in pre-upgrade delete actions | +-------------+----------+---------------------------------------------------------------+ - -.. note:: - - Update actions are performed in the pre/post sections of upgrade - - Upgrade - Actions - Update/Delete ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^