Skip to content

refactor: consolidate configuration into centralized config package#245

Merged
privateip merged 1 commit into
mainfrom
refactor/consolidate-config
Jul 17, 2026
Merged

refactor: consolidate configuration into centralized config package#245
privateip merged 1 commit into
mainfrom
refactor/consolidate-config

Conversation

@privateip

Copy link
Copy Markdown
Contributor

Replace scattered viper reads in galactic-router with a centralized
RouterConfig in internal/config, matching the existing CNIConfig pattern.
Rename CNIViper to CNIConfig with field-based access and split the monolithic
config.go into separate files per component for clearer ownership.

  • Rename CNIViper to CNIConfig with exported fields and Resolve() method
  • Add RouterConfig with NewRouterConfig(), BindFlags(), and Validate()
  • Split internal/config into config.go, cni.go, and router.go
  • Remove inline newViper(), bindFlags(), and validateConfig() from root.go
  • Update root.go to accept *RouterConfig instead of *viper.Viper
  • Rewrite config, CNI, and router test suites for the new APIs
  • Update router configuration docs to reference the config package

Replace scattered viper reads in galactic-router with a centralized
RouterConfig in internal/config, matching the existing CNIConfig pattern.
Rename CNIViper to CNIConfig with field-based access and split the monolithic
config.go into separate files per component for clearer ownership.

- Rename CNIViper to CNIConfig with exported fields and Resolve() method
- Add RouterConfig with NewRouterConfig(), BindFlags(), and Validate()
- Split internal/config into config.go, cni.go, and router.go
- Remove inline newViper(), bindFlags(), and validateConfig() from root.go
- Update root.go to accept *RouterConfig instead of *viper.Viper
- Rewrite config, CNI, and router test suites for the new APIs
- Update router configuration docs to reference the config package
@privateip
privateip requested a review from a team as a code owner July 17, 2026 20:25
@privateip
privateip requested a review from mattdjenkinson July 17, 2026 20:25
@ecv

ecv commented Jul 17, 2026

Copy link
Copy Markdown

@privateip flip plugin auto-update on to fix yer linewrap

@privateip
privateip merged commit e5872c3 into main Jul 17, 2026
8 checks passed
@privateip
privateip deleted the refactor/consolidate-config branch July 17, 2026 21:06
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