Repository navigation
Conversation
|
|
||
| // FindGitRepoRoot traverses upwards from startDir looking for a .git directory or file | ||
| // (supporting standard repositories, worktrees, and git submodules). | ||
| // If no git repository root is found, it returns an empty string and an error. |
There was a problem hiding this comment.
TODO: Add error handling
tuunit
left a comment
There was a problem hiding this comment.
(!) BREAKING: remove --work-dir, --config-file and --env-file flags. This is done in order to make it impossible to run kubara commands with configuration which does not belong to the current hub.
I think that is a no go. We know of users who are using those flags explicitely. This would force the file names .env and config.yaml, right?
Even our CI would break I think
| |--------------|------------|-----------------|--------------------|--------------------| | ||
| | | | | | | | ||
|
|
||
| # Directory-Scoped Workspaces for Multi-Hub GitOps Repositories |
There was a problem hiding this comment.
Whats a workspace in this context?
Maybe without introducing a "new" word and needing a definition what we mean in the context fo GitOps/kubara. Something simplified like:
| # Directory-Scoped Workspaces for Multi-Hub GitOps Repositories | |
| # Directory-Scoped Multi-Hub GitOps Repositories |
| ## Decision Drivers | ||
|
|
||
| - Different configurations may use different catalog versions and platform stacks. | ||
| - Templating for one configuration must never mutate, wipe, or overwrite another configuration's artifacts. |
There was a problem hiding this comment.
| - Templating for one configuration must never mutate, wipe, or overwrite another configuration's artifacts. | |
| - Templating for one configuration must never mutate, wipe or overwrite another configuration's manifests. |
|
|
||
| - Different configurations may use different catalog versions and platform stacks. | ||
| - Templating for one configuration must never mutate, wipe, or overwrite another configuration's artifacts. | ||
| - Zero breaking changes to existing single-configuration repositories. |
There was a problem hiding this comment.
Which wouldn't be true if we remove --config-file and/or --env-file
| - Zero breaking changes to existing single-configuration repositories. | ||
| - Keep Terraform relative module paths (`../../../../platform-components/...`) working without requiring modifications to catalog templates. | ||
| - Git repository subpaths must be computed automatically to simplify Argo CD GitOps workflows. | ||
| - Developer experience must be intuitive: easily target individual setups or run batch generation across all setups. |
There was a problem hiding this comment.
| - Developer experience must be intuitive: easily target individual setups or run batch generation across all setups. | |
| - Developer experience must be intuitive: Easily target individual multi-hub directories or run batch generation across all. |
|
|
||
| ## Decision Outcome | ||
|
|
||
| Chosen option: **One Hub per Config, one Folder per Hub**. |
There was a problem hiding this comment.
| Chosen option: **One Hub per Config, one Folder per Hub**. | |
| **One Hub per Config, one Folder per Hub**. |
| Because `platform-configs` and `platform-components` remain siblings inside each hub directory, existing Terraform relative source paths (`../../../../platform-components/...`) remain valid. | ||
|
|
||
| ### Automatic GitOps Path Computation | ||
| When executing within a hub folder, kubara generate automatically: |
There was a problem hiding this comment.
| When executing within a hub folder, kubara generate automatically: | |
| When executing within a hub folder, `kubara generate` automatically: |
| 1. **Directory Scoping**: Commands execute within the hub directory or target hubs via `--hub`. Legacy flags (`--work-dir`, `--config-file`, and `--env-file`) are removed in favor of directory-scoped context. | ||
| 1. **Batch Generation**: `kubara generate --all` (alias `-A`) discovers all configurations in the current directory and generates each hub in its own isolated context. | ||
| 1. **Removal of old Flags**: `--work-dir`, `--config-file` and `--env-file` have been removed and are replaced by `--hub` |
There was a problem hiding this comment.
to be discussed and duplication
Summary
Improve support for multi-hub setups
Change type
Breaking change
How I tested it
Notes for reviewers
solves #600
docs/content/10_decisions/ADR-0005-multi-hub-improvements.md WIP and subject to discussions and extensions, for example --hub support for more subcommands.
still need to do a bit of testing and verification for edge cases