Update plex migration to use updateStrategy

This commit is contained in:
Waqar Ahmed
2021-02-03 18:11:31 +05:00
parent de0e83ad39
commit 9bcb41d9d5
2 changed files with 17 additions and 14 deletions

View File

@@ -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

View File

@@ -113,7 +113,7 @@ questions:
- "definitions/timezone"
# Update strategy
- variable: strategyType
- variable: updateStrategy
description: "Upgrade Policy"
label: "Update Strategy"
group: "Scaling/Upgrade Policy"