-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
401e2f7
commit 7a52000
Showing
4 changed files
with
230 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{{/* | ||
Get the PostgreSQL password secret | ||
*/}} | ||
{{- define "ds.postgresql.secretName" -}} | ||
{{- if .Values.connections.dbPassword -}} | ||
{{- printf "%s-postgresql" .Release.Name -}} | ||
{{- else if .Values.connections.dbExistingSecret -}} | ||
{{- printf "%s" (tpl .Values.connections.dbExistingSecret $) -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return true if a secret object should be created for PostgreSQL | ||
*/}} | ||
{{- define "ds.postgresql.createSecret" -}} | ||
{{- if or .Values.connections.dbPassword (not .Values.connections.dbExistingSecret) -}} | ||
{{- true -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return PostgreSQL password | ||
*/}} | ||
{{- define "ds.postgresql.password" -}} | ||
{{- if not (empty .Values.connections.dbPassword) }} | ||
{{- .Values.connections.dbPassword }} | ||
{{- else }} | ||
{{- required "A PostgreSQL Password is required!" .Values.connections.dbPassword }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Get the RabbitMQ password secret | ||
*/}} | ||
{{- define "ds.rabbitmq.secretName" -}} | ||
{{- if .Values.connections.amqpPassword -}} | ||
{{- printf "%s-rabbitmq" .Release.Name -}} | ||
{{- else if .Values.connections.amqpExistingSecret -}} | ||
{{- printf "%s" (tpl .Values.connections.amqpExistingSecret $) -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return true if a secret object should be created for RabbitMQ | ||
*/}} | ||
{{- define "ds.rabbitmq.createSecret" -}} | ||
{{- if or .Values.connections.amqpPassword (not .Values.connections.amqpExistingSecret) -}} | ||
{{- true -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return RabbitMQ password | ||
*/}} | ||
{{- define "ds.rabbitmq.password" -}} | ||
{{- if not (empty .Values.connections.amqpPassword) }} | ||
{{- .Values.connections.amqpPassword }} | ||
{{- else }} | ||
{{- required "A RabbitMQ Password is required!" .Values.connections.amqpPassword }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Get the PVC name | ||
*/}} | ||
{{- define "ds.pvc.name" -}} | ||
{{- if .Values.persistence.existingClaim -}} | ||
{{- printf "%s" (tpl .Values.persistence.existingClaim $) -}} | ||
{{- else }} | ||
{{- printf "ds-files" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return true if a pvc object should be created | ||
*/}} | ||
{{- define "ds.pvc.create" -}} | ||
{{- if empty .Values.persistence.existingClaim }} | ||
{{- true -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters