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 bootstrapping local fs path and support for variables #14

Merged
merged 10 commits into from
Feb 8, 2024

Conversation

prabirshrestha
Copy link
Contributor

@prabirshrestha prabirshrestha commented Dec 5, 2023

This allows nomad-gitops-operator to be used without git repository. Can be useful when testing locally without pushing changes to the nomad cluster or when run in CI that pushes the code. I found that being able to bootstrap via local path is lot easier then having custom make files that deploys a bunch of nomad jobs specially once you have TLS enabled in the cluster.

  • Add support for bootstrapping local fs path
  • Add reconcile package to allow git and fs bootstrap to be reused.
  • Add watch flag to disable or enable watch mode (i.e. loop forever)
  • Add delete flag to disable or enable delete of missing jobs.
  • For git watch and delete flag is enabled by default
  • For fs watch and delete flag is disabled by default
  • Nomad use job "name" to detect duplicates instead of filename. Detect dupes using the job.Name and skip if dupe is encountered.
  • Add support for variable reconciliation. Variables are *.yml instead of hcl files as in the future we can easily add support for built-in sops decryption without installing additional tool. As meta is not supported for variables based on Add meta for Nomad Variables hashicorp/nomad#19329, using nomoporator and nomoporatorOldKeys to maintain state.

This PR includes changes from #13.

  • Migrated to use official github.com/hashicorp/nomad/api since openapi sdk is archived.
  • Send the original hcl when registering the job. If you go to the ui and see the job definition you should see the original hcl file instead of json. Do note that metadata are not added in the hcl file. This now allows you to easily update the job hcl from the ui.
  • update all go dependencies

@prabirshrestha prabirshrestha changed the title add support for bootstrapping local fs path add support for bootstrapping local fs path and support for variables Dec 11, 2023
@jonasvinther jonasvinther merged commit f4491b5 into jonasvinther:main Feb 8, 2024
1 check passed
@prabirshrestha prabirshrestha deleted the bootstrap-fs branch February 8, 2024 07:05
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