Extract config structs into pkg/probodconfig

probod-bootstrap only needs the config struct definitions for
YAML marshaling but transitively pulled in ~40 heavy runtime
dependencies via pkg/probod. Move all config types and their
methods to a new pkg/probodconfig package and re-export them
from pkg/probod via type aliases for backward compatibility.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-28 12:49:10 +04:00
parent 983331e4dd
commit c043a7f1f5
20 changed files with 237 additions and 169 deletions

View File

@@ -19,11 +19,11 @@ import (
"os"
"path/filepath"
"go.probo.inc/probo/pkg/probod"
"go.probo.inc/probo/pkg/probodconfig"
"sigs.k8s.io/yaml"
)
func WriteConfig(cfg *probod.FullConfig, path string) error {
func WriteConfig(cfg *probodconfig.FullConfig, path string) error {
dir := filepath.Dir(path)
if err := os.MkdirAll(dir, 0755); err != nil {
return fmt.Errorf("create directory %s: %w", dir, err)