diff --git a/charts/tracoor-single/Chart.yaml b/charts/tracoor-single/Chart.yaml index b0c2c265..0692aa23 100644 --- a/charts/tracoor-single/Chart.yaml +++ b/charts/tracoor-single/Chart.yaml @@ -3,7 +3,7 @@ name: tracoor-single description: Ethereum debug data capture and indexer home: https://github.com/ethpandaops/tracoor type: application -version: 0.0.4 +version: 0.0.5 maintainers: - name: samcm email: sam.calder-mason@ethereum.org diff --git a/charts/tracoor-single/README.md b/charts/tracoor-single/README.md index 1638933c..2b294287 100644 --- a/charts/tracoor-single/README.md +++ b/charts/tracoor-single/README.md @@ -1,7 +1,7 @@ # tracoor-single -![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Ethereum debug data capture and indexer @@ -84,19 +84,22 @@ Ethereum debug data capture and indexer | podAnnotations | object | `{}` | Pod annotations | | podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created | | podLabels | object | `{}` | Pod labels | +| postgresql.architecture | string | `"standalone"` | | | postgresql.auth.database | string | `"tracoor"` | | | postgresql.auth.enablePostgresUser | bool | `true` | | | postgresql.auth.password | string | `"postgres"` | | | postgresql.auth.postgresPassword | string | `"postgres"` | | | postgresql.auth.username | string | `"postgres"` | | -| postgresql.enabled | bool | `true` | | +| postgresql.enabled | bool | `true` | If enabled a postgres chart will be deployed as a dependency | +| postgresql.fullnameOverride | string | `""` | | | postgresql.image.registry | string | `"docker.io"` | | | postgresql.image.repository | string | `"bitnami/postgresql"` | | | postgresql.image.tag | string | `"16.4.0-debian-12-r2"` | | -| postgresql.name | string | `"{{ .Release.Name }}-postgresql"` | If enabled a postgres chart will be deployed as a dependency | -| postgresql.persistence.enabled | bool | `true` | | -| postgresql.persistence.size | string | `"8Gi"` | | +| postgresql.nameOverride | string | `""` | | | postgresql.primary.extendedConfiguration | string | `"max_connections = 1024\n"` | | +| postgresql.primary.persistence.enabled | bool | `true` | | +| postgresql.primary.persistence.size | string | `"8Gi"` | | +| postgresql.primary.resources | object | `{}` | | | postgresql.pullPolicy | string | `"IfNotPresent"` | | | priorityClassName | string | `nil` | Pod priority class | | readinessProbe | object | See `values.yaml` | Readiness probe | diff --git a/charts/tracoor-single/templates/_helpers.tpl b/charts/tracoor-single/templates/_helpers.tpl index decc8a7a..65d946f1 100644 --- a/charts/tracoor-single/templates/_helpers.tpl +++ b/charts/tracoor-single/templates/_helpers.tpl @@ -78,3 +78,16 @@ Create the name of the service account to use {{ (split ":" .Values.config.server.pprofAddr)._1 | default "6060" }} {{- end -}} {{- end -}} + +{{- define "tracoor-single.postgresql.fullname" -}} +{{- if .Values.postgresql.fullnameOverride -}} +{{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default "postgresql" .Values.postgresql.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/charts/tracoor-single/templates/configmap.yaml b/charts/tracoor-single/templates/configmap.yaml index 15d468dd..d7614e2b 100644 --- a/charts/tracoor-single/templates/configmap.yaml +++ b/charts/tracoor-single/templates/configmap.yaml @@ -8,7 +8,7 @@ data: config.yaml: |- {{- $config := deepCopy .Values.config -}} {{- if .Values.postgresql.enabled -}} - {{- $_ := set $config.server.persistence "dsn" (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" .Values.postgresql.auth.username .Values.postgresql.auth.password (tpl .Values.postgresql.name $) .Values.postgresql.auth.database) -}} + {{- $_ := set $config.server.persistence "dsn" (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" .Values.postgresql.auth.username .Values.postgresql.auth.password (include "tracoor-single.postgresql.fullname" $) .Values.postgresql.auth.database) -}} {{- $_ := set $config.server.persistence "driver_name" "postgres" -}} {{- end -}} {{ toYaml $config | nindent 4 }} diff --git a/charts/tracoor-single/values.yaml b/charts/tracoor-single/values.yaml index 5636fde3..ed491c16 100644 --- a/charts/tracoor-single/values.yaml +++ b/charts/tracoor-single/values.yaml @@ -306,8 +306,10 @@ serviceMonitor: postgresql: # -- If enabled a postgres chart will be deployed as a dependency - name: "{{ .Release.Name }}-postgresql" enabled: true + nameOverride: "" + fullnameOverride: "" + architecture: "standalone" image: registry: docker.io repository: bitnami/postgresql @@ -322,6 +324,7 @@ postgresql: primary: extendedConfiguration: | max_connections = 1024 - persistence: - enabled: true - size: 8Gi + persistence: + enabled: true + size: 8Gi + resources: {}