Skip to content

Commit

Permalink
OPSEXP-2297: change alfresco-common.db.port named template param to a…
Browse files Browse the repository at this point in the history
… single str (#138)
  • Loading branch information
alxgomz authored Oct 27, 2023
1 parent 3b0c588 commit f6eba7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
A helper subchart to avoid duplication in alfresco charts and set common
external dependencies
type: library
version: 3.0.0-alpha.3
version: 3.0.0-alpha.4
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-common

![Version: 3.0.0-alpha.3](https://img.shields.io/badge/Version-3.0.0--alpha.3-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 3.0.0-alpha.4](https://img.shields.io/badge/Version-3.0.0--alpha.4-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)

A helper subchart to avoid duplication in alfresco charts and set common
external dependencies
Expand Down
6 changes: 3 additions & 3 deletions charts/alfresco-common/templates/_helpers-jdbc.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ Usage: include "alfresco-common.db.hostname" "URL"
{{/*
Provide database port from JDBC URL
Usage: include "alfresco-common.db.port" (dict "url" "someurl")
Usage: include "alfresco-common.db.port" "URL"
*/}}
{{- define "alfresco-common.db.port" -}}
{{- $socket := (index (include "alfresco-common.jdbc.parser" .url | fromJson) "jdbc" "host") }}
{{- $socket := (index (include "alfresco-common.jdbc.parser" . | fromJson) "jdbc" "host") }}
{{- if gt ($socket | splitList ":" | len) 1 }}
{{- $socket | splitList ":" | last }}
{{- else }}
{{- template "alfresco-common.db.default.port" (index (include "alfresco-common.jdbc.parser" .url | fromJson) "jdbc" "scheme") }}
{{- template "alfresco-common.db.default.port" (index (include "alfresco-common.jdbc.parser" . | fromJson) "jdbc" "scheme") }}
{{- end }}
{{- end -}}
Expand Down

0 comments on commit f6eba7a

Please sign in to comment.