Commit 8d8fe11e authored by Waqar Ahmed's avatar Waqar Ahmed

Add helper functions to retrieve new/old chart versions

parent 142c8354
...@@ -106,24 +106,9 @@ app.kubernetes.io/name: {{ include "nextcloud.name" . }} ...@@ -106,24 +106,9 @@ app.kubernetes.io/name: {{ include "nextcloud.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- 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 Nextcloud service account
*/}} */}}
{{- define "nextcloud.serviceAccountName" -}} {{- define "nextcloud.serviceAccountName" -}}
{{- printf "%s-service-account" .Release.Name -}} {{- printf "%s-service-account" .Release.Name -}}
{{- end -}} {{- end -}}
{{/*
Get Nextloud Postgres Database Name
*/}}
{{- define "postgres.DatabaseName" -}}
{{- print "nextcloud" -}}
{{- end -}}
{{/*
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 }}
{{/*
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 -}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment