Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(charts/tracoor-single): postgresql config #339

Merged
merged 2 commits into from
Oct 3, 2024
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/tracoor-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
Expand Down
13 changes: 8 additions & 5 deletions charts/tracoor-single/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
Expand Down
13 changes: 13 additions & 0 deletions charts/tracoor-single/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
2 changes: 1 addition & 1 deletion charts/tracoor-single/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 7 additions & 4 deletions charts/tracoor-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -322,6 +324,7 @@ postgresql:
primary:
extendedConfiguration: |
max_connections = 1024
persistence:
enabled: true
size: 8Gi
persistence:
enabled: true
size: 8Gi
resources: {}
Loading