Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 7c27eed

Browse files
authored
Fixes REDIS values never being unset, allows disabling backend migrations init container in helm charts (#2951)
1 parent 0e2f00e commit 7c27eed

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

backend/charts/api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ A Helm chart for the Neosync Backend API
5959
| migrations.db.port | int | `5432` | The database port |
6060
| migrations.db.schemaDir | string | `"/migrations"` | The directory where the migrations are located. |
6161
| migrations.db.username | string | `nil` | The username that will be used for authentication |
62+
| migrations.enabled | bool | `true` | Whether or not the migrations init container will be added to the deployment |
6263
| migrations.extraEnvVars | list | `[]` | Provide extra environment variables that will be applied to the migration init container. |
6364
| nameOverride | string | `nil` | Override the name specified on the Chart, which defaults to .Chart.Name |
6465
| neosyncCloud.enabled | bool | `false` | Whether or not this is NeosyncCloud |

backend/charts/api/templates/deployment.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ spec:
8181
{{- toYaml .Values.affinity | nindent 8 }}
8282
{{- end }}
8383

84+
{{- if .Values.migrations.enabled }}
8485
initContainers:
8586
- name: db-migration
8687
image: '{{ .Values.image.repository | default "ghcr.io/nucleuscloud/neosync/api" }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
@@ -117,6 +118,7 @@ spec:
117118
envFrom:
118119
- secretRef:
119120
name: {{ template "neosync-api.fullname" . }}-migration-evs
121+
{{- end }}
120122

121123
{{- with .Values.volumes }}
122124
volumes:
@@ -219,10 +221,6 @@ spec:
219221
envFrom:
220222
- secretRef:
221223
name: {{ template "neosync-api.fullname" . }}-service-evs
222-
# {{- if eq .Values.nucleusEnv "dev" }} # config created by Tilt; keep this at the bottom to override
223-
# - configMapRef:
224-
# name: dev-config
225-
# {{- end }}
226224

227225
{{- if .Values.sidecarContainers }}
228226
{{- toYaml .Values.sidecarContainers | nindent 8 }}

backend/charts/api/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ db:
5959

6060
# Specify connection information for the migrations init container
6161
migrations:
62+
# -- Whether or not the migrations init container will be added to the deployment
63+
enabled: true
6264
## Specify database connection information for the migrations init container to connect to
6365
db:
6466
# -- The database hostname

charts/neosync/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ A Helm chart for Neosync that contains the api, app, and worker
7070
| api.migrations.db.port | int | `5432` | The database port |
7171
| api.migrations.db.schemaDir | string | `"/migrations"` | The directory where the migrations are located. |
7272
| api.migrations.db.username | string | `nil` | The username that will be used for authentication |
73+
| api.migrations.enabled | bool | `true` | Whether or not the migrations init container will be added to the deployment |
7374
| api.migrations.extraEnvVars | list | `[]` | Provide extra environment variables that will be applied to the migration init container. |
7475
| api.nameOverride | string | `nil` | Override the name specified on the Chart, which defaults to .Chart.Name |
7576
| api.neosyncCloud.enabled | bool | `false` | Whether or not this is NeosyncCloud |

worker/charts/worker/templates/env-vars.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,9 @@ stringData:
7373
REDIS_MASTER: {{ .Values.redis.master }}
7474
{{- end }}
7575

76-
{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.enabled }}
7776
REDIS_TLS_ENABLED: {{ .Values.redis.tls.enabled | default "false" | quote }}
78-
{{- end }}
79-
80-
{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.skipCertVerify }}
8177
REDIS_TLS_SKIP_CERT_VERIFY: {{ .Values.redis.tls.skipCertVerify | default "false" | quote }}
82-
{{- end }}
83-
84-
{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.enableRenegotiation }}
8578
REDIS_TLS_ENABLE_RENEGOTIATION: {{ .Values.redis.tls.enableRenegotiation | default "false" | quote }}
86-
{{- end }}
8779

8880
{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.rootCertAuthority }}
8981
REDIS_TLS_ROOT_CERT_AUTHORITY: {{ .Values.redis.tls.rootCertAuthority }}

0 commit comments

Comments
 (0)