Skip to content

Commit

Permalink
Fixes REDIS values never being unset, allows disabling backend migrat…
Browse files Browse the repository at this point in the history
…ions init container in helm charts (#2951)
  • Loading branch information
nickzelei authored Nov 18, 2024
1 parent 0e2f00e commit 7c27eed
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions backend/charts/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ A Helm chart for the Neosync Backend API
| migrations.db.port | int | `5432` | The database port |
| migrations.db.schemaDir | string | `"/migrations"` | The directory where the migrations are located. |
| migrations.db.username | string | `nil` | The username that will be used for authentication |
| migrations.enabled | bool | `true` | Whether or not the migrations init container will be added to the deployment |
| migrations.extraEnvVars | list | `[]` | Provide extra environment variables that will be applied to the migration init container. |
| nameOverride | string | `nil` | Override the name specified on the Chart, which defaults to .Chart.Name |
| neosyncCloud.enabled | bool | `false` | Whether or not this is NeosyncCloud |
Expand Down
6 changes: 2 additions & 4 deletions backend/charts/api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ spec:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}

{{- if .Values.migrations.enabled }}
initContainers:
- name: db-migration
image: '{{ .Values.image.repository | default "ghcr.io/nucleuscloud/neosync/api" }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
Expand Down Expand Up @@ -117,6 +118,7 @@ spec:
envFrom:
- secretRef:
name: {{ template "neosync-api.fullname" . }}-migration-evs
{{- end }}

{{- with .Values.volumes }}
volumes:
Expand Down Expand Up @@ -219,10 +221,6 @@ spec:
envFrom:
- secretRef:
name: {{ template "neosync-api.fullname" . }}-service-evs
# {{- if eq .Values.nucleusEnv "dev" }} # config created by Tilt; keep this at the bottom to override
# - configMapRef:
# name: dev-config
# {{- end }}

{{- if .Values.sidecarContainers }}
{{- toYaml .Values.sidecarContainers | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions backend/charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ db:

# Specify connection information for the migrations init container
migrations:
# -- Whether or not the migrations init container will be added to the deployment
enabled: true
## Specify database connection information for the migrations init container to connect to
db:
# -- The database hostname
Expand Down
1 change: 1 addition & 0 deletions charts/neosync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ A Helm chart for Neosync that contains the api, app, and worker
| api.migrations.db.port | int | `5432` | The database port |
| api.migrations.db.schemaDir | string | `"/migrations"` | The directory where the migrations are located. |
| api.migrations.db.username | string | `nil` | The username that will be used for authentication |
| api.migrations.enabled | bool | `true` | Whether or not the migrations init container will be added to the deployment |
| api.migrations.extraEnvVars | list | `[]` | Provide extra environment variables that will be applied to the migration init container. |
| api.nameOverride | string | `nil` | Override the name specified on the Chart, which defaults to .Chart.Name |
| api.neosyncCloud.enabled | bool | `false` | Whether or not this is NeosyncCloud |
Expand Down
8 changes: 0 additions & 8 deletions worker/charts/worker/templates/env-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,9 @@ stringData:
REDIS_MASTER: {{ .Values.redis.master }}
{{- end }}

{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.enabled }}
REDIS_TLS_ENABLED: {{ .Values.redis.tls.enabled | default "false" | quote }}
{{- end }}

{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.skipCertVerify }}
REDIS_TLS_SKIP_CERT_VERIFY: {{ .Values.redis.tls.skipCertVerify | default "false" | quote }}
{{- end }}

{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.enableRenegotiation }}
REDIS_TLS_ENABLE_RENEGOTIATION: {{ .Values.redis.tls.enableRenegotiation | default "false" | quote }}
{{- end }}

{{- if and .Values.redis .Values.redis.tls .Values.redis.tls.rootCertAuthority }}
REDIS_TLS_ROOT_CERT_AUTHORITY: {{ .Values.redis.tls.rootCertAuthority }}
Expand Down

0 comments on commit 7c27eed

Please sign in to comment.