Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/trento-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: The trento server chart contains all the components necessary to ru
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates
version: 3.1.0-dev1
version: 3.1.0-dev2

dependencies:
- name: trento-web
Expand Down
5 changes: 3 additions & 2 deletions charts/trento-server/charts/postgresql/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}

{{/*
Return the proper PostgreSQL image name
Use postgresql image from the global values if set, otherwise use the local one
*/}}
{{- define "postgresql.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- $imageRoot := merge (.Values.global.postgresql.image | default dict) (.Values.image | default dict) -}}
{{- include "common.images.image" (dict "imageRoot" $imageRoot "global" .Values.global) -}}
{{- end -}}

{{/*
Expand Down
6 changes: 3 additions & 3 deletions charts/trento-server/charts/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ global:
## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
##
image:
registry: docker.io
repository: bitnami/postgresql
tag: 11.11.0-debian-10-r71
registry: registry.suse.com
repository: suse/postgres
tag: "14"
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,11 @@ Create CORS origin value
{{- printf "http://%s-%s" .Release.Name .Values.global.trentoWanda.name -}}
{{- end -}}
{{- end -}}

{{/*
Use postgresql image from the global values if set, otherwise use the local one
*/}}
{{- define "trento-wanda.postgresqlImage" -}}
{{- $imageRoot := merge (.Values.global.postgresql.image | default dict) (.Values.postgresql.image | default dict) -}}
{{- include "common.images.image" (dict "imageRoot" $imageRoot "global" .Values.global) -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- name: checks
mountPath: /usr/share/trento/checks
- name: create-wanda-db
image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
image: "{{ include "trento-wanda.postgresqlImage" . }}"
command:
- sh
- -c
Expand Down
8 changes: 8 additions & 0 deletions charts/trento-server/charts/trento-web/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,11 @@ Return Trento Web service port
{{- .Values.trentoWebOrigin -}}
{{- end -}}
{{- end -}}

{{/*
Use postgresql image from the global values if set, otherwise use the local one
*/}}
{{- define "trento-web.postgresqlImage" -}}
{{- $imageRoot := merge (.Values.global.postgresql.image | default dict) (.Values.postgresql.image | default dict) -}}
{{- include "common.images.image" (dict "imageRoot" $imageRoot "global" .Values.global) -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
{{- end }}
initContainers:
- name: create-trento-db
image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
image: "{{ include "trento-web.postgresqlImage" . }}"
command:
- sh
- -c
Expand All @@ -69,7 +69,7 @@ spec:
\gexec

- name: create-trento-eventstore
image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
image: "{{ include "trento-web.postgresqlImage" . }}"
command:
- sh
- -c
Expand Down
8 changes: 4 additions & 4 deletions charts/trento-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ global:
servicePort: 5432
postgresqlUsername: "postgres"
postgresqlPassword: "postgres"
image:
registry: registry.suse.com
repository: suse/postgres
tag: "14"
prometheus:
name: prometheus-server
pathPrefix: /prometheus
Expand Down Expand Up @@ -64,10 +68,6 @@ trento-mcp-server:

postgresql:
enabled: true
image:
registry: registry.suse.com
repository: suse/postgres
tag: "14"
persistence:
mountPath: /var/lib/postgresql/data
postgresqlDataDir: /var/lib/postgresql/data/trento
Expand Down
Loading