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

hof/mod: support module mirrors #197

Open
verdverm opened this issue May 6, 2023 · 2 comments
Open

hof/mod: support module mirrors #197

verdverm opened this issue May 6, 2023 · 2 comments
Labels
area / mod enhancement New feature or request

Comments

@verdverm
Copy link
Member

verdverm commented May 6, 2023

{ oci, git } X { public, private}

we want to test mirroring oci->oci & git->oci too

@verdverm
Copy link
Member Author

verdverm commented May 6, 2023

I'm not sure we implemented mirrors correctly, how the path or url is represented, I think CUE will do it differently and we should align with that, or we can have a say in how it is done?

I'm not concerned about implementing mirrors yet, we can put that off to the next release, building blocks are here now

@verdverm verdverm changed the title hof/mod: tests for mirrors hof/mod: support module mirrors Aug 14, 2023
@verdverm
Copy link
Member Author

verdverm commented Aug 14, 2023

Need to think through the config, also want to account for format, auth, and other extras

This file is part of a users' (or CI) environment, not on a project basis, not part of a module. In other words, your configuration here will not influence downstream users, who will get the same (or different) modules from the same dependency list. We probably need a canonical source of truth for modules, probably in the module.cue

something like

registries: [string]: {
  url: string
  port: int
  format: "git" | "oci"  // git mirror supports forks without the need for a replace
  
  auth: {
    ... stuff to reference or configure method, not the credentials themselves
    we may not need anything here, as we leverage the external tools auth
  }

  modules: [prefix]: {
    // not sure we need anything here, but we'll leave it open, we want a struct anyway, not a list, for easy lookup
  }
}

alternatively, we could reorg this as

module: [prefix=string]: {
  registry config...
}

This might also become a larger hof/config.cue file that holds more stuff, makes sense to have just a single config file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area / mod enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant