Skip to content

Commit

Permalink
chore: remove PostgreSQL dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Dec 19, 2023
1 parent 4a4da27 commit 5a8caa4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 73 deletions.
6 changes: 0 additions & 6 deletions charts/rollups-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ maintainers:

type: application
version: 1.2.0-0

dependencies:
- name: postgresql
version: 12.1.9
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
11 changes: 6 additions & 5 deletions charts/rollups-node/ci/test-values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ indexer:
extraEnvVars:
- name: "REDIS_ENDPOINT"
value: "redis://redis-master"
- name: "POSTGRES_ENDPOINT"
value: "postgres://postgres:[email protected]:5432/postgres"
graphqlServer:
extraEnvVars:
- name: "POSTGRES_ENDPOINT"
value: "postgres://postgres:[email protected]:5432/postgres"

image:
pullPolicy: Always

postgresql:
enabled: false
endpoint:
value: postgres://postgres:[email protected]:5432/postgres
12 changes: 0 additions & 12 deletions charts/rollups-node/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ Expand the name of the chart.
{{- default (regexReplaceAll "(^.*)(-chart)$" .Chart.Name "${1}" ) .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Return POSTGRES_ENDPOINT values
*/}}
{{- define "validator.postgresEndpoint" -}}
{{- if .Values.postgresql.enabled }}
{{- print "postgres://" .Values.postgresql.auth.username ":" .Values.postgresql.auth.password "@" .Release.Name "-postgresql." .Release.Namespace ":" .Values.postgresql.auth.port "/" .Values.postgresql.auth.database -}}
{{- else if not (empty .Values.postgresql.endpoint.secretRef) }}
{{- else }}
{{- print (required "A valid .Values.postgresql.endpoint.value is required when .Values.postgresql is false" .Values.postgresql.endpoint.value) -}}
{{- end }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down
16 changes: 0 additions & 16 deletions charts/rollups-node/templates/database-secret.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions charts/rollups-node/templates/graphql-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ spec:
- name: GRAPHQL_PORT
value: "4000"
envFrom:
- secretRef:
{{- if (empty .Values.postgresql.endpoint.secretRef) }}
name: {{ include "validator.fullname" . }}-database
{{- else }}
name: {{ .Values.postgresql.endpoint.secretRef }}
{{- end }}
{{- if or .Values.graphqlServer.extraEnvVarsCM .Values.graphqlServer.extraEnvVarsSecret }}
{{- if .Values.graphqlServer.extraEnvVarsCM }}
- configMapRef:
Expand Down
6 changes: 0 additions & 6 deletions charts/rollups-node/templates/indexer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ spec:
{{- include "tplvalues.render" (dict "value" .Values.indexer.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- secretRef:
{{- if (empty .Values.postgresql.endpoint.secretRef) }}
name: {{ include "validator.fullname" . }}-database
{{- else }}
name: {{ .Values.postgresql.endpoint.secretRef }}
{{- end }}
{{- if or .Values.indexer.extraEnvVarsCM .Values.indexer.extraEnvVarsSecret }}
{{- if .Values.indexer.extraEnvVarsCM }}
- configMapRef:
Expand Down
22 changes: 0 additions & 22 deletions charts/rollups-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -867,25 +867,3 @@ graphqlServer:

# -- Optionally specify extra list of additional volumeMounts for the endpoints.graphqlServer container(s)
extraVolumeMounts: []

## PostgreSQL configuration
postgresql:
# -- Use bitnami postgreSQL pod.
enabled: true
# -- Define an external Postgresql endpoint
endpoint:
# -- Connection detail like postgres://host:pass@host:port/db.
# REQUIRED if you don't have an existing secret.
value:
# -- Define an existing secret name.
# REQUIRED if you don't want to define an endpoint value.
secretRef:
# -- Set bitnami postgreSQL`username`, `password`,`database`.
auth:
username: rollups
password: rollups
database: rollups
port: 5432
image:
# -- bitnami postgreSQL docker image tag.
tag: 13.9.0-debian-11-r27

0 comments on commit 5a8caa4

Please sign in to comment.