Skip to content

Conversation

@shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Feb 15, 2024

This is a utility that aims to standardise the way we consume configurations when interacting with the Lagoon API via various tools.

The goal is to make it so that configuration for one tool can be used by another tool seamlessly as long as the configuration is in the expected location.

This utility is designed ONLY for the Lagoon API/UI/Auth interactions. If building a tool that has its own configurations, then a similar method of interacting with that tools configuration should leverage XDG in a similar manner but store the information in different files to remain independent of the core configuration.

Considerations

  • This is only for core configuration for tools, additional configurations should write their own configuration management that leverages concepts from this package without touching the core config files it generates.
  • Migrations from existing configurations to this new format should be handled within those tools
    • the lagoon-cli will have a migration hook that can prompt a user to migrate their configuration if an old one is detected.
    • lagoon-sync should probably have something similar for the core configuration.
  • lagoon-sync has additional configurations for handling syncs of different components (rsync/dbs, etc), these should be handled separately to the core configuration, either within lagoon-syncs own configuration utility, or an extension of this utility.

@shreddedbacon shreddedbacon requested a review from bomoko February 15, 2024 22:08
@shreddedbacon shreddedbacon marked this pull request as ready for review February 16, 2024 00:01
Copy link
Contributor

@bomoko bomoko left a comment

Choose a reason for hiding this comment

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

Great stuff. Couple comments, but happy to approve.

Looking forward to integrating this into sync, etc.

@shreddedbacon
Copy link
Member Author

I've added some optional items to the config too just because they're possibly exposed by the /.well-known/appspecific/sh.lagoon.discovery.json endpoint, and if we introduce discovery utilities, this information could be consumed into configuration easily.

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.

3 participants