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

Store fileserver #159

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Store fileserver #159

merged 2 commits into from
Jan 22, 2024

Conversation

amartin120
Copy link
Contributor

@amartin120 amartin120 commented Jan 22, 2024

Please check below, if the PR fulfills these requirements:

  • The commit message follows the guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added / updated (for bug fixes / features).

What kind of change does this PR introduce?

  • Currently, hauler store serve only supports serving an OCI compatible registry. This change implements an additional option to serve a traditional file server for files and charts that have been added to the local haul/store.

What is the current behavior?

  • the hauler store serve command is only for serving a registry.
❯ hauler store serve -h   
Expose the content of a local store through an OCI compliant server

Usage:
  hauler store serve [flags]

Flags:
  -c, --config string      Path to a config file, will override all other configs
  -d, --daemon             Toggle serving as a daemon
      --directory string   Directory to use for registry backend (defaults to '$PWD/registry') (default "registry")
  -h, --help               help for serve
  -p, --port int           Port to listen on (default 5000)

Global Flags:
      --cache string       Location of where to store cache data (defaults to $XDG_CACHE_DIR/hauler)
  -l, --log-level string    (default "info")
  -s, --store string       Location to create store at (default "store") 

What is the new behavior (if this is a feature change)?

  • added new subcommands for differentiating a registry or a file server.
❯ hauler store serve registry -h
Serve the embedded registry

Usage:
  hauler store serve registry [flags]

Flags:
  -c, --config string      Path to a config file, will override all other configs
      --directory string   Directory to use for backend.  Defaults to $PWD/registry (default "registry")
  -h, --help               help for registry
  -p, --port int           Port to listen on. (default 5000)

Global Flags:
      --cache string       Location of where to store cache data (defaults to $XDG_CACHE_DIR/hauler)
  -l, --log-level string    (default "info")
  -s, --store string       Location to create store at (default "store")

and

❯ hauler store serve fileserver -h 
Serve the file server

Usage:
  hauler store serve fileserver [flags]

Flags:
      --directory string   Directory to use for backend.  Defaults to $PWD/store-files (default "store-files")
  -h, --help               help for fileserver
  -p, --port int           Port to listen on. (default 8080)

Global Flags:
      --cache string       Location of where to store cache data (defaults to $XDG_CACHE_DIR/hauler)
  -l, --log-level string    (default "info")
  -s, --store string       Location to create store at (default "store")

Does this PR introduce a breaking change?

  • hauler store serve no longer starts a registry without the added registry subcommand.

Other information:

@amartin120 amartin120 merged commit cc917af into hauler-dev:main Jan 22, 2024
1 check passed
@amartin120 amartin120 deleted the store-fileserver branch February 16, 2024 15:45
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