Browse Source

ddns-updater: dont require host (#2825)

* ddns-updater: dont require host

* cleanup removed valeus
Stavros Kois 11 tháng trước cách đây
mục cha
commit
31a1166385

+ 1 - 1
library/ix-dev/community/ddns-updater/Chart.yaml

@@ -3,7 +3,7 @@ description: Lightweight universal DDNS Updater with web UI
 annotations:
   title: DDNS Updater
 type: application
-version: 1.0.30
+version: 1.0.31
 apiVersion: v2
 appVersion: 2.9.0
 kubeVersion: '>=1.16.0-0'

+ 7 - 0
library/ix-dev/community/ddns-updater/migrations/migrate

@@ -17,6 +17,13 @@ def migrate(values):
         values[storageKey][storage] = {key: value for key, value in check_val.items() if key != 'hostPath'}
 
 
+    for config in values.get('ddnsConfig', {}).get('config', []):
+        for key in config.keys():
+            if key.endswith('ProviderIP'):
+                config.pop(key)
+                break
+
+
     return values
 
 

+ 1 - 1
library/ix-dev/community/ddns-updater/templates/_configuration.tpl

@@ -56,7 +56,7 @@ settings:
       {{- fail (printf "DDNS Updater - DNS Provider [%v] is not supported" $item.provider) -}}
     {{- end }}
   - provider: {{ $item.provider }}
-    host: {{ $item.host | required (printf "DDNS Updater - Expected non-empty [Host] for %v provider" $item.provider) | quote }}
+    host: {{ $item.host | quote }}
     domain: {{ $item.domain | required (printf "DDNS Updater - Expected non-empty [Domain] for %v provider" $item.provider) | quote }}
     ip_version: {{ $item.ipVersion | default "" | quote }}
     {{- include (printf "ddns.config.%v" $item.provider) (dict "item" $item) | trim | nindent 4 -}}