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

Add support for annotation of DB Migration job #28

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

Conversation

wstewartlyra
Copy link

@wstewartlyra wstewartlyra commented Apr 4, 2024

Background

When using a GitOps tool like ArgoCD to manage the deployment of the nexus-iq-server-ha helm chart, the db-migration job will run in an infinite loop when automatic sync functionality is enabled. Most GitOps tools like ArgoCD allow for Sync Hooks to be applied via annotations on resources, which can control the lifecycle of resources.

Because the job template for the db-migration resource doesn't allow applying annotations, it's not possible to apply the necessary annotations to apply sync hooks.

Proposed changes

  • Update the db-migration job template to allow passing custom annotations to attach to the job resource.

@wstewartlyra wstewartlyra changed the title Add support for annotation DB Migration job Add support for annotation of DB Migration job Apr 5, 2024
Copy link
Collaborator

@mealingr mealingr left a comment

Choose a reason for hiding this comment

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

+1

Comment on lines +99 to +100
# Annotations to apply to the DB migration job
migrationJobAnnotations:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add a small test for this in iq-server-jobs_test.yaml to check setting this value applies the annotations correctly

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