Skip to content

Commit

Permalink
feat: handle strapi db replication
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikZed committed Apr 25, 2024
1 parent ffb1beb commit 040592d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/strapi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.66
version: 0.1.67

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions charts/strapi/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ Create chart name and version as used by the chart label.
{{- end }}

{{- define "strapi.internalDatabaseUrl" -}}
{{- if eq .Values.postgresql.architecture "replication" }}
{{- printf "%s%s%s%s%s%s%s%s" "postgresql://" .Values.postgresql.auth.username ":" .Values.postgresql.auth.password "@" .Release.Name "-postgresql-primary:5432/" .Values.postgresql.auth.database }}
{{- else }}
{{- printf "%s%s%s%s%s%s%s%s" "postgresql://" .Values.postgresql.auth.username ":" .Values.postgresql.auth.password "@" .Release.Name "-postgresql:5432/" .Values.postgresql.auth.database }}
{{- end }}
{{- end }}

{{/*
Common labels
Expand Down

0 comments on commit 040592d

Please sign in to comment.