diff --git a/charts/wg-easy/2.0.0/templates/_migration.tpl b/charts/wg-easy/2.0.0/templates/_migration.tpl deleted file mode 100644 index 9e147f7a1e..0000000000 --- a/charts/wg-easy/2.0.0/templates/_migration.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{- define "wgeasy.migration.checks" -}} - {{/* Safely access the context, so it wont block CI */}} - {{- if hasKey .Values.global "ixChartContext" -}} - {{- if not .Values.global.ixChartContext.upgradeMetadata -}} - {{- fail "Upgrade Metadata is missing. Cannot proceed" -}} - {{- end -}} - - {{- $oldChartVersion := .Values.global.ixChartContext.upgradeMetadata.oldChartVersion -}} - {{- $newChartVersion := .Values.global.ixChartContext.upgradeMetadata.newChartVersion -}} - - {{/* Explode versions */}} - {{- $oldV := semver $oldChartVersion -}} - {{- $newV := semver $newChartVersion -}} - - {{/* If new is v2.x.x */}} - {{- if eq ($newV.Major | int) 2 -}} - {{/* And old is v1.x.x, but lower than .11 */}} - {{- if and (eq $oldV.Major 1) (lt ($oldV.Patch | int) 11) -}} - {{/* Block the upgrade */}} - {{- fail "Migration to 2.x.x is only allowed from 1.0.11 or higher" -}} - {{- end -}} - {{- end -}} - - {{- end -}} -{{- end -}} diff --git a/charts/wg-easy/2.0.0/.helmignore b/charts/wg-easy/2.0.1/.helmignore similarity index 100% rename from charts/wg-easy/2.0.0/.helmignore rename to charts/wg-easy/2.0.1/.helmignore diff --git a/charts/wg-easy/2.0.0/Chart.lock b/charts/wg-easy/2.0.1/Chart.lock similarity index 100% rename from charts/wg-easy/2.0.0/Chart.lock rename to charts/wg-easy/2.0.1/Chart.lock diff --git a/charts/wg-easy/2.0.0/Chart.yaml b/charts/wg-easy/2.0.1/Chart.yaml similarity index 97% rename from charts/wg-easy/2.0.0/Chart.yaml rename to charts/wg-easy/2.0.1/Chart.yaml index 37e441d7a9..9f8eb15cef 100644 --- a/charts/wg-easy/2.0.0/Chart.yaml +++ b/charts/wg-easy/2.0.1/Chart.yaml @@ -3,7 +3,7 @@ description: WG-Easy is the easiest way to install & manage WireGuard! annotations: title: WG Easy type: application -version: 2.0.0 +version: 2.0.1 apiVersion: v2 appVersion: "7" kubeVersion: ">=1.16.0-0" diff --git a/charts/wg-easy/2.0.0/README.md b/charts/wg-easy/2.0.1/README.md similarity index 100% rename from charts/wg-easy/2.0.0/README.md rename to charts/wg-easy/2.0.1/README.md diff --git a/charts/wg-easy/2.0.0/app-readme.md b/charts/wg-easy/2.0.1/app-readme.md similarity index 100% rename from charts/wg-easy/2.0.0/app-readme.md rename to charts/wg-easy/2.0.1/app-readme.md diff --git a/charts/wg-easy/2.0.0/charts/common-1.2.3.tgz b/charts/wg-easy/2.0.1/charts/common-1.2.3.tgz similarity index 100% rename from charts/wg-easy/2.0.0/charts/common-1.2.3.tgz rename to charts/wg-easy/2.0.1/charts/common-1.2.3.tgz diff --git a/charts/wg-easy/2.0.0/ci/test-values.yaml b/charts/wg-easy/2.0.1/ci/test-values.yaml similarity index 100% rename from charts/wg-easy/2.0.0/ci/test-values.yaml rename to charts/wg-easy/2.0.1/ci/test-values.yaml diff --git a/charts/wg-easy/2.0.0/ix_values.yaml b/charts/wg-easy/2.0.1/ix_values.yaml similarity index 100% rename from charts/wg-easy/2.0.0/ix_values.yaml rename to charts/wg-easy/2.0.1/ix_values.yaml diff --git a/charts/wg-easy/2.0.0/metadata.yaml b/charts/wg-easy/2.0.1/metadata.yaml similarity index 100% rename from charts/wg-easy/2.0.0/metadata.yaml rename to charts/wg-easy/2.0.1/metadata.yaml diff --git a/charts/wg-easy/2.0.0/migrations/migrate b/charts/wg-easy/2.0.1/migrations/migrate similarity index 96% rename from charts/wg-easy/2.0.0/migrations/migrate rename to charts/wg-easy/2.0.1/migrations/migrate index 1d9d1348a6..c3c949d3d6 100755 --- a/charts/wg-easy/2.0.0/migrations/migrate +++ b/charts/wg-easy/2.0.1/migrations/migrate @@ -84,8 +84,6 @@ def migrate(values): if __name__ == '__main__': - with open('in.json', 'r') as f: - print(json.dumps(migrate(json.loads(f.read())))) if len(sys.argv) != 2: exit(1) diff --git a/charts/wg-easy/2.0.0/questions.yaml b/charts/wg-easy/2.0.1/questions.yaml similarity index 100% rename from charts/wg-easy/2.0.0/questions.yaml rename to charts/wg-easy/2.0.1/questions.yaml diff --git a/charts/wg-easy/2.0.1/templates/_migration.tpl b/charts/wg-easy/2.0.1/templates/_migration.tpl new file mode 100644 index 0000000000..285d52b421 --- /dev/null +++ b/charts/wg-easy/2.0.1/templates/_migration.tpl @@ -0,0 +1,26 @@ +{{- define "wgeasy.migration.checks" -}} + {{/* Safely access the context, so it wont block CI */}} + {{- if hasKey .Values.global "ixChartContext" -}} + {{- if .Values.global.ixChartContext.upgradeMetadata -}} + + {{- $oldChartVersion := .Values.global.ixChartContext.upgradeMetadata.oldChartVersion -}} + {{- $newChartVersion := .Values.global.ixChartContext.upgradeMetadata.newChartVersion -}} + {{- if and (not $oldChartVersion) (not $newChartVersion) -}} + {{- fail "Upgrade Metadata is missing. Cannot proceed" -}} + {{- end -}} + + {{/* Explode versions */}} + {{- $oldV := semver $oldChartVersion -}} + {{- $newV := semver $newChartVersion -}} + + {{/* If new is v2.x.x */}} + {{- if eq ($newV.Major | int) 2 -}} + {{/* And old is v1.x.x, but lower than .11 */}} + {{- if and (eq $oldV.Major 1) (lt ($oldV.Patch | int) 11) -}} + {{/* Block the upgrade */}} + {{- fail "Migration to 2.x.x is only allowed from 1.0.11 or higher" -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/charts/wg-easy/2.0.0/templates/_persistence.tpl b/charts/wg-easy/2.0.1/templates/_persistence.tpl similarity index 100% rename from charts/wg-easy/2.0.0/templates/_persistence.tpl rename to charts/wg-easy/2.0.1/templates/_persistence.tpl diff --git a/charts/wg-easy/2.0.0/templates/_portal.tpl b/charts/wg-easy/2.0.1/templates/_portal.tpl similarity index 100% rename from charts/wg-easy/2.0.0/templates/_portal.tpl rename to charts/wg-easy/2.0.1/templates/_portal.tpl diff --git a/charts/wg-easy/2.0.0/templates/_service.tpl b/charts/wg-easy/2.0.1/templates/_service.tpl similarity index 100% rename from charts/wg-easy/2.0.0/templates/_service.tpl rename to charts/wg-easy/2.0.1/templates/_service.tpl diff --git a/charts/wg-easy/2.0.0/templates/_wgeasy.tpl b/charts/wg-easy/2.0.1/templates/_wgeasy.tpl similarity index 100% rename from charts/wg-easy/2.0.0/templates/_wgeasy.tpl rename to charts/wg-easy/2.0.1/templates/_wgeasy.tpl diff --git a/charts/wg-easy/2.0.0/templates/common.yaml b/charts/wg-easy/2.0.1/templates/common.yaml similarity index 100% rename from charts/wg-easy/2.0.0/templates/common.yaml rename to charts/wg-easy/2.0.1/templates/common.yaml diff --git a/charts/wg-easy/2.0.0/to_keep_versions.md b/charts/wg-easy/2.0.1/to_keep_versions.md similarity index 100% rename from charts/wg-easy/2.0.0/to_keep_versions.md rename to charts/wg-easy/2.0.1/to_keep_versions.md