_postgres.tpl 732 B

123456789101112131415161718192021222324
  1. {{/*
  2. Get Nextloud Postgres Database Name
  3. */}}
  4. {{- define "postgres.DatabaseName" -}}
  5. {{- print "nextcloud" -}}
  6. {{- end -}}
  7. {{/*
  8. Postgres Selector labels
  9. */}}
  10. {{- define "nextcloud.postgres.selectorLabels" -}}
  11. app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres
  12. app.kubernetes.io/instance: {{ .Release.Name }}-postgres
  13. {{- end }}
  14. {{/*
  15. Retrieve postgres backup name
  16. This will return a unique name based on revision and chart numbers specified.
  17. */}}
  18. {{- define "postgres.backupName" -}}
  19. {{- $upgradeDict := .Values.ixChartContext.upgradeMetadata -}}
  20. {{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}}
  21. {{- end }}