diff --git a/internal/app/archied/control_plane.go b/internal/app/archied/control_plane.go index 81ed8b008..8cf46d858 100644 --- a/internal/app/archied/control_plane.go +++ b/internal/app/archied/control_plane.go @@ -24,7 +24,7 @@ func (b *boot) runtimeConfig(ctx context.Context, base config.Config) (config.Co if settings := b.executionSettings.Load(); settings != nil { applyExecutionBudgets(cfg, *settings) } - }) + }, nil) } func (b *boot) loadRuntimeConfig(ctx context.Context) error { diff --git a/internal/app/archiegateway/server.go b/internal/app/archiegateway/server.go index a24aeecd4..0b61f7948 100644 --- a/internal/app/archiegateway/server.go +++ b/internal/app/archiegateway/server.go @@ -209,7 +209,7 @@ func (b *server) openState(ctx context.Context) error { } func (b *server) runtimeConfig(ctx context.Context, base config.Config) (config.Config, map[string]int64, error) { - return servicekit.RuntimeConfig(ctx, b.controlPlane, b.applyStatus, b.secrets, b.log, base, nil) + return servicekit.RuntimeConfig(ctx, b.controlPlane, b.applyStatus, b.secrets, b.log, base, nil, gatewayRuntimeKinds) } // connectNATS joins the broker task actions travel over. The daemon owns the diff --git a/internal/app/servicekit/runtimeconfig.go b/internal/app/servicekit/runtimeconfig.go index 7f72b3595..933bc7e90 100644 --- a/internal/app/servicekit/runtimeconfig.go +++ b/internal/app/servicekit/runtimeconfig.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "log/slog" + "slices" "github.com/samcharles93/archie-core/internal/app/controlplane" "github.com/samcharles93/archie-core/internal/config" @@ -15,8 +16,10 @@ import ( // RuntimeConfig layers the control plane's stored settings over base, lets // adjust apply the caller's own live settings, then validates the result and // resolves its provider secrets. The outcome is reported for every layered -// kind, so a refused document keeps the version still running on the record. -func RuntimeConfig(ctx context.Context, cp *controlplane.Client, status *applystatus.Reporter, secrets *secret.Registry, log *slog.Logger, base config.Config, adjust func(*config.Config)) (config.Config, map[string]int64, error) { +// kind in reportKinds (every kind when nil), so a refused document keeps the +// version still running on the record and a process never reports a kind it +// does not re-apply live. +func RuntimeConfig(ctx context.Context, cp *controlplane.Client, status *applystatus.Reporter, secrets *secret.Registry, log *slog.Logger, base config.Config, adjust func(*config.Config), reportKinds []string) (config.Config, map[string]int64, error) { cfg, versions, err := cp.RuntimeConfig(ctx, base) if err != nil { return config.Config{}, nil, err @@ -26,6 +29,9 @@ func RuntimeConfig(ctx context.Context, cp *controlplane.Client, status *applyst } report := func(applyErr error) { for kind, version := range versions { + if reportKinds != nil && !slices.Contains(reportKinds, kind) { + continue + } status.Report(ctx, kind, version, applyErr) } }