From db62ed3f75deb0866ce08a82fe95cfbbe39f728f Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:35:23 +0200 Subject: [PATCH] fix typo in migration (#2185) * fix typo in migration * cleaner * Update migrate --- library/ix-dev/charts/pihole/Chart.yaml | 2 +- library/ix-dev/charts/pihole/migrations/migrate | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/library/ix-dev/charts/pihole/Chart.yaml b/library/ix-dev/charts/pihole/Chart.yaml index cadefda19b..551520cd28 100644 --- a/library/ix-dev/charts/pihole/Chart.yaml +++ b/library/ix-dev/charts/pihole/Chart.yaml @@ -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' diff --git a/library/ix-dev/charts/pihole/migrations/migrate b/library/ix-dev/charts/pihole/migrations/migrate index 24afaf26a4..12a1927377 100755 --- a/library/ix-dev/charts/pihole/migrations/migrate +++ b/library/ix-dev/charts/pihole/migrations/migrate @@ -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)