Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
9bcb41d9
Commit
9bcb41d9
authored
Feb 03, 2021
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update plex migration to use updateStrategy
parent
de0e83ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
test/plex/1.0.1/migrations/migrate.py
test/plex/1.0.1/migrations/migrate.py
+16
-13
test/plex/1.0.1/questions.yaml
test/plex/1.0.1/questions.yaml
+1
-1
No files found.
test/plex/1.0.1/migrations/migrate.py
View file @
9bcb41d9
def
migrate
(
values
):
def
migrate
(
values
):
values
[
'appVolumeMounts'
]
=
{
values
.
update
({
'appVolumeMounts'
:
{
'transcode'
:
{
'transcode'
:
{
'hostPathEnabled'
:
values
[
'transcodeHostPathEnabled'
],
'hostPathEnabled'
:
values
[
'transcodeHostPathEnabled'
],
**
({
'hostPath'
:
values
[
'transcodeHostPath'
]}
if
values
.
get
(
'transcodeHostPath'
)
else
{})
**
({
'hostPath'
:
values
[
'transcodeHostPath'
]}
if
values
.
get
(
'transcodeHostPath'
)
else
{})
...
@@ -12,5 +13,7 @@ def migrate(values):
...
@@ -12,5 +13,7 @@ def migrate(values):
'hostPathEnabled'
:
values
[
'dataHostPathEnabled'
],
'hostPathEnabled'
:
values
[
'dataHostPathEnabled'
],
**
({
'hostPath'
:
values
[
'dataHostPath'
]}
if
values
.
get
(
'dataHostPath'
)
else
{})
**
({
'hostPath'
:
values
[
'dataHostPath'
]}
if
values
.
get
(
'dataHostPath'
)
else
{})
},
},
}
},
'updateStrategy'
:
values
.
get
(
'strategyType'
,
'Recreate'
),
})
return
values
return
values
test/plex/1.0.1/questions.yaml
View file @
9bcb41d9
...
@@ -113,7 +113,7 @@ questions:
...
@@ -113,7 +113,7 @@ questions:
-
"
definitions/timezone"
-
"
definitions/timezone"
# Update strategy
# Update strategy
-
variable
:
strategyType
-
variable
:
updateStrategy
description
:
"
Upgrade
Policy"
description
:
"
Upgrade
Policy"
label
:
"
Update
Strategy"
label
:
"
Update
Strategy"
group
:
"
Scaling/Upgrade
Policy"
group
:
"
Scaling/Upgrade
Policy"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment