Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
gagantrivedi committed Jul 8, 2024
1 parent a87862a commit 1f8d1f5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: flagsmith
description: Flagsmith
type: application
version: 0.50.0
version: 0.51.0
appVersion: 2.126.0
dependencies:
- name: postgresql
Expand Down
5 changes: 2 additions & 3 deletions charts/flagsmith/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ See https://docs.flagsmith.com/deployment/locally-api#creating-a-secret-key
######################################

InfluxDB2 is deprecated and will be removed in the next major version.
You can either use InfluxDBExternal or migrate your analytics data to PostgreSQL by using the migrateAnalyticsData job
and enable PostgreSQL analytics by setting `UsePostgresForAnalytics.enabled` to true.

Please set values under the `influxdbExternal` key
or migrate your analytics data to PostgreSQL by enabling `jobs.migrateAnalytics`.
{{- end }}

--------------------------------------
2 changes: 1 addition & 1 deletion charts/flagsmith/templates/_api_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{{- end }}
{{- else if .Values.UsePostgresForAnalytics.enabled }}
{{- if not .Values.taskProcessor.enabled }}
{{ fail "To use Postgre for analytics, the task processor must be enabled" }}
{{ fail "To use PostgreSQL for analytics, `taskProcessor.enabled` should be set to `true`" }}
{{- end}}
- name: USE_POSTGRES_FOR_ANALYTICS
value: 'true'
Expand Down
14 changes: 13 additions & 1 deletion charts/flagsmith/templates/jobs-migrate-analytics-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ spec:
template:
spec:
restartPolicy: Never
{{- if .Values.jobs.migrateDb.serviceAccountName }}
serviceAccountName: {{ .Values.jobs.migrateDb.serviceAccountName }}
{{- end }}
{{- if .Values.jobs.migrateDb.shareProcessNamespace }}
{{- end }}
shareProcessNamespace: true
containers:
- name: migrate-analytics-data
image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default (printf "%s" .Chart.AppVersion) }}
Expand All @@ -23,5 +29,11 @@ spec:
args: {{ toYaml .Values.jobs.migrateAnalyticsData.args | nindent 8 }}
{{- end }}
env: {{ include (print $.Template.BasePath "/_api_environment.yaml") . | nindent 8 }}

{{- with .Values.jobs.migrateDb.extraContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
volumes:
{{- with .Values.jobs.migrateDb.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/flagsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ jobs:
migrateAnalyticsData:
enabled: false
args: []
extraContainers: []
extraVolumes: []

# These tests just make non-destructive requests to the services in
# the cluster. Enabling this and running helm test is safe.
Expand Down

0 comments on commit 1f8d1f5

Please sign in to comment.