Skip to content

Consolidate galactic-* repos into unified monorepo#2

Merged
scotwells merged 18 commits intomainfrom
consolidate-monorepo
Mar 12, 2026
Merged

Consolidate galactic-* repos into unified monorepo#2
scotwells merged 18 commits intomainfrom
consolidate-monorepo

Conversation

@scotwells
Copy link
Contributor

Summary

This PR brings together the previously separate galactic-operator, galactic-agent, galactic-cni, galactic-common, galactic-router, and galactic-lab repositories into a single, unified codebase.

The main benefit is simplicity: there's now one galactic binary that handles everything via subcommands, one container image to deploy, and one place to make changes. Development is faster because you don't have to coordinate across multiple repos, and deployment is straightforward since all components share the same version.

Test plan

  • Build passes locally
  • Unit tests pass
  • Deploy to test cluster and verify end-to-end VPC attachment

🤖 Generated with Claude Code

scotwells and others added 18 commits March 6, 2026 13:21
Merge galactic-operator, galactic-agent, galactic-cni, galactic-common,
galactic-router, and galactic-lab into a single consolidated repository
with unified Go module path go.datum.net/galactic.

Key changes:
- Single `galactic` binary with operator/agent/cni/version subcommands
- CNI auto-detection via CNI_COMMAND environment variable
- Unified directory structure following Go project layout
- Preserved full git history from all original repositories

Directory structure:
- cmd/galactic/         - Unified binary entry point
- pkg/apis/             - Kubernetes CRD types (VPC, VPCAttachment)
- pkg/common/           - Shared utilities (sysctl, vrf, util)
- pkg/proto/            - Protocol Buffer definitions
- internal/operator/    - Kubernetes operator implementation
- internal/agent/       - Network agent implementation
- internal/cni/         - CNI plugin implementation
- internal/cmd/         - Subcommand implementations
- config/               - Kubernetes manifests
- router/               - Python routing engine
- lab/                  - Testing infrastructure
- build/                - Dockerfiles
- hack/                 - Build scripts

Migration paths:
- galactic-common/*           -> pkg/common/
- galactic-operator/api/*     -> pkg/apis/
- galactic-operator/internal/ -> internal/operator/
- galactic-agent/api/*        -> pkg/proto/
- galactic-agent/srv6/*       -> internal/agent/srv6/
- galactic-cni/cni/*          -> internal/cni/
- galactic-router/*           -> router/
- galactic-lab/*              -> lab/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides a complete Linux development environment with:
- Go 1.24 with gopls, delve, golangci-lint
- Python 3.13 for router development
- Docker-in-Docker for Kind clusters
- Network tools (iproute2, iptables, tcpdump) for SRv6/CNI testing
- kubectl, kustomize, kind for Kubernetes development
- protoc for Protocol Buffer compilation

Runs with elevated privileges (NET_ADMIN, SYS_ADMIN) required for
network namespace operations, VRF configuration, and CNI testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The root .devcontainer/ now provides all development capabilities
including Docker-in-Docker for lab testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The standalone agent in lab/platform/wsl/srv6-vpc-lab-attachment/galactic-agent/
is now redundant since the agent code exists in the main repo at internal/agent/.

The WSL lab should use the consolidated galactic binary instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Provides Docker-based testing for macOS development:
- ./scripts/test-local.sh unit     - Fast unit tests
- ./scripts/test-local.sh router   - Python BDD tests
- ./scripts/test-local.sh operator - Full operator tests with envtest
- ./scripts/test-local.sh build    - Build Linux binary
- ./scripts/test-local.sh all      - Run everything

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CI workflow (.github/workflows/ci.yml):
- Tier 1 (every PR):
  - Lint with golangci-lint
  - Unit tests for operator and common packages
  - Operator tests with envtest
  - Router BDD tests with Behave
  - Build verification
  - Docker image build (no push)

- Tier 2 (main branch/releases):
  - E2E tests with Kind cluster
  - CRD installation verification
  - Operator deployment validation
  - Sample resource creation

Release workflow (.github/workflows/release.yml):
- Triggered on version tags (v*)
- Multi-arch build (amd64, arm64)
- Push to ghcr.io
- Generate install manifest
- Create GitHub release

Also adds Dependabot configuration for:
- Go modules (weekly)
- GitHub Actions (weekly)
- Python dependencies (weekly)
- Docker base images (weekly)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These are superseded by the root CI/CD workflows:
- router/.github/workflows/test.yml -> .github/workflows/ci.yml (test-router job)
- router/.github/workflows/publish.yml -> .github/workflows/release.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces a concise README that explains Galactic's purpose as a
multi-cloud networking solution for Kubernetes, the problem it solves,
and the value it provides to developers, platform teams, and organizations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move LICENSE to repo root (was lab/LICENSE)
- Remove duplicate router/LICENSE
- Update config/manager/manager.yaml with consolidated image and command
- Update config/agent/daemonset.yaml with consolidated image and command
- Update lab documentation to reference consolidated repo
- Update lab/kindest-node-galactic/install.sh for unified binary
- Update WSL lab setup scripts and config files
- Regenerate router protobuf with correct go_package path
- Fix remaining import paths in internal packages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update golangci-lint to v2.1.6 (supports Go 1.24)
- Add WPS365 to flake8 ignore list (match statement used intentionally)
- Regenerate Go protobuf with correct tooling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use golangci-lint-action v7 (required for golangci-lint v2.x)
- Fix KUBEBUILDER_ASSETS setup in operator tests
- Regenerate local.pb.go and local_grpc.pb.go with correct tooling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add manifest generation step to operator tests workflow
- Fix errcheck errors by explicitly ignoring viper.BindPFlag returns
- Remove unnecessary uint32 conversion in vrf.go
- Exclude lab directory from golangci-lint checks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Exclude lab/ directory from golangci-lint with ^lab/ pattern
- Add constants for repeated test strings in util_test.go
- Update relative paths in controller suite_test.go for monorepo structure
- Update relative paths in webhook suite_test.go for monorepo structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Install Claude Code via npm in post-create script and mount the
host's .gitconfig into the container so git identity is inherited
automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add shared Claude Code settings with plugins config
- Exclude local Claude settings from version control
- Switch Claude Code install to native installer (curl)
- Mount host SSH keys into devcontainer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move common allow permissions (git, go, web) to project settings
- Remove .ssh mount in favor of automatic SSH agent forwarding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The file is now covered by .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@scotwells scotwells merged commit 9988738 into main Mar 12, 2026
8 checks passed
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