diff --git a/backend/charts/api/README.md b/backend/charts/api/README.md index c485abe050..35fca182f9 100644 --- a/backend/charts/api/README.md +++ b/backend/charts/api/README.md @@ -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 | diff --git a/backend/charts/api/templates/deployment.yaml b/backend/charts/api/templates/deployment.yaml index 6e3d235c7e..14885727da 100644 --- a/backend/charts/api/templates/deployment.yaml +++ b/backend/charts/api/templates/deployment.yaml @@ -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 }}' @@ -117,6 +118,7 @@ spec: envFrom: - secretRef: name: {{ template "neosync-api.fullname" . }}-migration-evs + {{- end }} {{- with .Values.volumes }} volumes: @@ -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 }} diff --git a/backend/charts/api/values.yaml b/backend/charts/api/values.yaml index 8e4cd7601d..0db0c4058c 100644 --- a/backend/charts/api/values.yaml +++ b/backend/charts/api/values.yaml @@ -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 diff --git a/charts/neosync/README.md b/charts/neosync/README.md index 96791b9377..3e9be4e6fa 100644 --- a/charts/neosync/README.md +++ b/charts/neosync/README.md @@ -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 | diff --git a/worker/charts/worker/templates/env-vars.yaml b/worker/charts/worker/templates/env-vars.yaml index 57ba7374b9..79c362ca9e 100644 --- a/worker/charts/worker/templates/env-vars.yaml +++ b/worker/charts/worker/templates/env-vars.yaml @@ -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 }}