mirror of
https://github.com/truenas/charts.git
synced 2026-04-05 19:58:21 +08:00
fix typo in migration (#2185)
* fix typo in migration * cleaner * Update migrate
This commit is contained in:
@@ -3,7 +3,7 @@ description: DNS and Ad-filtering for your network.
|
||||
annotations:
|
||||
title: Pi-hole
|
||||
type: application
|
||||
version: 2.0.2
|
||||
version: 2.0.3
|
||||
apiVersion: v2
|
||||
appVersion: 2023.11.0
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -60,7 +60,7 @@ def migrate_common_lib(values):
|
||||
# Migrate Storage
|
||||
'piholeStorage': {
|
||||
'config': migrate_volume(values['appVolumeMounts']['config']),
|
||||
'cache': migrate_volume(values['appVolumeMounts']['dnsmasq']),
|
||||
'dnsmasq': migrate_volume(values['appVolumeMounts']['dnsmasq']),
|
||||
'additionalStorages': [
|
||||
{
|
||||
'type': 'hostPath',
|
||||
@@ -83,6 +83,10 @@ def migrate(values):
|
||||
if not 'appVolumeMounts' in values.keys():
|
||||
return values
|
||||
|
||||
# Handle typo for users that already gone through the migration
|
||||
if 'cache' in values['piholeStorage'].keys():
|
||||
values['piholeStorage']['dnsmasq'] = values['piholeStorage'].pop('cache')
|
||||
|
||||
return migrate_common_lib(values)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user