diff --git a/test/nextcloud/1.0.0/templates/_backup.tpl b/test/nextcloud/1.0.0/templates/_backup.tpl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/nextcloud/1.0.0/templates/_helpers.tpl b/test/nextcloud/1.0.0/templates/_helpers.tpl index 20b46bd16e..43114be492 100644 --- a/test/nextcloud/1.0.0/templates/_helpers.tpl +++ b/test/nextcloud/1.0.0/templates/_helpers.tpl @@ -106,24 +106,9 @@ app.kubernetes.io/name: {{ include "nextcloud.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{/* -Postgres Selector labels -*/}} -{{- define "nextcloud.postgres.selectorLabels" -}} -app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres -app.kubernetes.io/instance: {{ .Release.Name }}-postgres -{{- end }} - {{/* Nextcloud service account */}} {{- define "nextcloud.serviceAccountName" -}} {{- printf "%s-service-account" .Release.Name -}} {{- end -}} - -{{/* -Get Nextloud Postgres Database Name -*/}} -{{- define "postgres.DatabaseName" -}} -{{- print "nextcloud" -}} -{{- end -}} diff --git a/test/nextcloud/1.0.0/templates/_postgres.tpl b/test/nextcloud/1.0.0/templates/_postgres.tpl new file mode 100644 index 0000000000..bb0ef0d0d0 --- /dev/null +++ b/test/nextcloud/1.0.0/templates/_postgres.tpl @@ -0,0 +1,16 @@ +{{/* +Get Nextloud Postgres Database Name +*/}} +{{- define "postgres.DatabaseName" -}} +{{- print "nextcloud" -}} +{{- end -}} + +{{/* +Postgres Selector labels +*/}} +{{- define "nextcloud.postgres.selectorLabels" -}} +app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres +app.kubernetes.io/instance: {{ .Release.Name }}-postgres +{{- end }} + + diff --git a/test/nextcloud/1.0.0/templates/_upgrade.tpl b/test/nextcloud/1.0.0/templates/_upgrade.tpl new file mode 100644 index 0000000000..eb0ae1e660 --- /dev/null +++ b/test/nextcloud/1.0.0/templates/_upgrade.tpl @@ -0,0 +1,21 @@ +{{/* +Retrieve previous chart version from which we are upgrading to a newer chart version +*/}} +{{- define "tn.chart.old_version" -}} +{{- if .Values.ixChartContext.is_upgrade -}} +{{- .Values.ixChartContext.upgradeMetadata.oldChartVersion -}} +{{- else -}} +{{- fail "A chart upgrade is not taking place" -}} +{{- end -}} +{{- end -}} + +{{/* +Retrieve new chart version to which we are upgrading from an old chart version +*/}} +{{- define "tn.chart.new_version" -}} +{{- if .Values.ixChartContext.is_upgrade -}} +{{- .Values.ixChartContext.upgradeMetadata.newChartVersion -}} +{{- else -}} +{{- fail "A chart upgrade is not taking place" -}} +{{- end -}} +{{- end -}}