Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jobs): Add job to migrate analytics data from influx to postgres #230

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gagantrivedi
Copy link
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have bumped the version number in /charts/flagsmith/Chart.yaml in the section version or I'm merging to a
    release branch

Changes

Please describe.

How did you test this code?

Please describe.

@gagantrivedi gagantrivedi requested a review from a team as a code owner June 6, 2024 07:23
@gagantrivedi gagantrivedi requested review from khvn26 and removed request for a team June 6, 2024 07:23
Comment on lines 16 to 24
spec:
restartPolicy: Never
containers:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add:

  • extraContainers
  • extraVolumes
  • shareProcessNamespace
  • serviceAccountName

to support all kinds of database connectivity configurations

See jobs-migrate-db for an example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -52,6 +52,15 @@
name: {{ template "flagsmith.influxdb.fullname" . }}-external-auth
key: admin-token
{{- end }}
{{- else if .Values.UsePostgresForAnalytics.enabled }}
{{- if not .Values.taskProcessor.enabled }}
{{ fail "To use Postgre for analytics, the task processor must be enabled" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ 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`" }}

######################################

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can either use InfluxDBExternal or migrate your analytics data to PostgreSQL by using the migrateAnalyticsData job
Please set values under the `influxdbExternal` key
or migrate your analytics data to PostgreSQL by enabling `jobs.migrateAnalytics`.

@gagantrivedi gagantrivedi force-pushed the feat/jobs-migrate-analytics branch 2 times, most recently from 37693b6 to 1f8d1f5 Compare July 8, 2024 04:24
@gagantrivedi gagantrivedi requested a review from khvn26 July 8, 2024 04:38
@gagantrivedi gagantrivedi assigned khvn26 and unassigned khvn26 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants