From 9bcb41d9d549c7a04459423f87487fe32e494696 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Wed, 3 Feb 2021 18:11:31 +0500 Subject: [PATCH] Update plex migration to use updateStrategy --- test/plex/1.0.1/migrations/migrate.py | 29 +++++++++++++++------------ test/plex/1.0.1/questions.yaml | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/test/plex/1.0.1/migrations/migrate.py b/test/plex/1.0.1/migrations/migrate.py index d35e3a6aca..4c4566f675 100644 --- a/test/plex/1.0.1/migrations/migrate.py +++ b/test/plex/1.0.1/migrations/migrate.py @@ -1,16 +1,19 @@ def migrate(values): - values['appVolumeMounts'] = { - 'transcode': { - 'hostPathEnabled': values['transcodeHostPathEnabled'], - **({'hostPath': values['transcodeHostPath']} if values.get('transcodeHostPath') else {}) + values.update({ + 'appVolumeMounts': { + 'transcode': { + 'hostPathEnabled': values['transcodeHostPathEnabled'], + **({'hostPath': values['transcodeHostPath']} if values.get('transcodeHostPath') else {}) + }, + 'config': { + 'hostPathEnabled': values['configHostPathEnabled'], + **({'hostPath': values['configHostPath']} if values.get('configHostPath') else {}) + }, + 'data': { + 'hostPathEnabled': values['dataHostPathEnabled'], + **({'hostPath': values['dataHostPath']} if values.get('dataHostPath') else {}) + }, }, - 'config': { - 'hostPathEnabled': values['configHostPathEnabled'], - **({'hostPath': values['configHostPath']} if values.get('configHostPath') else {}) - }, - 'data': { - 'hostPathEnabled': values['dataHostPathEnabled'], - **({'hostPath': values['dataHostPath']} if values.get('dataHostPath') else {}) - }, - } + 'updateStrategy': values.get('strategyType', 'Recreate'), + }) return values diff --git a/test/plex/1.0.1/questions.yaml b/test/plex/1.0.1/questions.yaml index 9dba0e4288..c6df63ec46 100644 --- a/test/plex/1.0.1/questions.yaml +++ b/test/plex/1.0.1/questions.yaml @@ -113,7 +113,7 @@ questions: - "definitions/timezone" # Update strategy - - variable: strategyType + - variable: updateStrategy description: "Upgrade Policy" label: "Update Strategy" group: "Scaling/Upgrade Policy"