Skip to content

feat: Support initContainers in migration job#202

Merged
jeremy-albuixech merged 2 commits intoopenfga:mainfrom
vihangm:vihang/support_init_migrate
Mar 31, 2025
Merged

feat: Support initContainers in migration job#202
jeremy-albuixech merged 2 commits intoopenfga:mainfrom
vihangm:vihang/support_init_migrate

Conversation

@vihangm
Copy link
Contributor

@vihangm vihangm commented Mar 25, 2025

Description

When using Google Cloud SQL as a database provider, the database is made available via a sidecar that proxies the requests. To ensure that migrations work in such scenarios, initContainers need to be supported in the migration job.
I tried to use the initContainer (non-job) style migration, but that doesn't work either since the initContainers are run in order and the migration initContainer is added before extraInitContainers in the deployment. So the proxy doesn't run until after the migration init is expected to complete.

References

Fixes #191

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@vihangm vihangm requested review from a team as code owners March 25, 2025 06:19
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jeremy-albuixech / name: Jérémy Albuixech (7937527)
  • ✅ login: vihangm / name: Vihang Mehta (3c2d55b)

@vihangm vihangm force-pushed the vihang/support_init_migrate branch from fd12a81 to 689871c Compare March 25, 2025 06:28
Signed-off-by: Vihang Mehta <vihang@gimletlabs.ai>
@vihangm vihangm force-pushed the vihang/support_init_migrate branch from 689871c to 3c2d55b Compare March 25, 2025 17:06
Copy link
Contributor

@jeremy-albuixech jeremy-albuixech left a comment

Choose a reason for hiding this comment

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

looks good, thank you!

@jeremy-albuixech jeremy-albuixech merged commit 5efbd54 into openfga:main Mar 31, 2025
4 checks passed
@vihangm vihangm deleted the vihang/support_init_migrate branch March 31, 2025 18:22
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.

Migrate Job Init Containers

2 participants

Comments