Skip to content

Add support for annotation of DB Migration job - #28

Open
wstewartlyra wants to merge 2 commits into
sonatype:mainfrom
wstewartlyra:job-annotation
Open

Add support for annotation of DB Migration job#28
wstewartlyra wants to merge 2 commits into
sonatype:mainfrom
wstewartlyra:job-annotation

Conversation

@wstewartlyra

@wstewartlyra wstewartlyra commented Apr 4, 2024

Copy link
Copy Markdown

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

@mealingr mealingr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

Comment thread chart/values.yaml
Comment on lines +99 to +100
# Annotations to apply to the DB migration job
migrationJobAnnotations:

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