Documentation
¶
Index ¶
- type CellDiffResult
- type ChangeType
- type ContainerDiff
- type DiffResult
- type ReconcileResult
- func CreateConfig(r runner.Runner, desired intmodel.CellConfig) (ReconcileResult, error)
- func ReconcileBlueprint(r runner.Runner, desired intmodel.CellBlueprint) (ReconcileResult, error)
- func ReconcileCell(r runner.Runner, desired intmodel.Cell) (ReconcileResult, error)
- func ReconcileConfig(r runner.Runner, desired intmodel.CellConfig) (ReconcileResult, error)
- func ReconcileContainer(r runner.Runner, desired intmodel.Container) (ReconcileResult, error)
- func ReconcileRealm(r runner.Runner, desired intmodel.Realm) (ReconcileResult, error)
- func ReconcileSecret(r runner.Runner, desired intmodel.Secret) (ReconcileResult, error)
- func ReconcileSpace(r runner.Runner, desired intmodel.Space) (ReconcileResult, error)
- func ReconcileStack(r runner.Runner, desired intmodel.Stack) (ReconcileResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellDiffResult ¶
type CellDiffResult struct {
DiffResult
RootContainerChanged bool
RootContainerDetails map[string]string
Containers []ContainerDiff
Orphans []string // container IDs to be removed
}
CellDiffResult extends DiffResult with container-level diffs.
func DiffCell ¶
func DiffCell(desired, actual intmodel.Cell) CellDiffResult
DiffCell compares desired and actual cell states.
type ChangeType ¶
type ChangeType int
ChangeType classifies the type of change detected.
const ( // ChangeTypeNone indicates no changes detected. ChangeTypeNone ChangeType = iota // ChangeTypeAdditive indicates new fields or resources added. ChangeTypeAdditive // ChangeTypeCompatible indicates backward-compatible changes (labels, env vars, etc.). ChangeTypeCompatible // ChangeTypeBreaking indicates breaking changes that require destructive operations. ChangeTypeBreaking )
type ContainerDiff ¶
type ContainerDiff struct {
Name string
Action string // "add", "remove", "update"
ChangedFields []string
BreakingChanges []string
Details map[string]string
}
ContainerDiff represents changes to a container within a cell.
type DiffResult ¶
type DiffResult struct {
HasChanges bool
ChangeType ChangeType
ChangedFields []string
BreakingChanges []string
Details map[string]string // field -> description of change
}
DiffResult represents the result of comparing desired vs actual state.
func DiffContainer ¶
func DiffContainer(desired, actual intmodel.Container) DiffResult
DiffContainer compares desired and actual container states.
func DiffRealm ¶
func DiffRealm(desired, actual intmodel.Realm) DiffResult
DiffRealm compares desired and actual realm states.
func DiffSpace ¶
func DiffSpace(desired, actual intmodel.Space) DiffResult
DiffSpace compares desired and actual space states.
func DiffStack ¶
func DiffStack(desired, actual intmodel.Stack) DiffResult
DiffStack compares desired and actual stack states.
type ReconcileResult ¶
type ReconcileResult struct {
Action string // "created", "updated", "unchanged", "deleted"
Kind string // Resource kind
Name string // Resource name
Resource interface{} // The reconciled resource (internal model)
Changes []string // List of changed fields
Details map[string]string // Detailed change descriptions
}
ReconcileResult represents the result of reconciling a resource.
func CreateConfig ¶ added in v0.6.0
func CreateConfig(r runner.Runner, desired intmodel.CellConfig) (ReconcileResult, error)
CreateConfig is the atomic create-only sibling of ReconcileConfig used by `kuke create config` (issue #839). It runs the same scope-existence, blueprint-resolution, and slot-fill validation as ReconcileConfig, but persists via runner.WriteConfigIfAbsent — so two concurrent create attempts on the same name can never silently overwrite each other. Returns errdefs.ErrConfigExists when a Config with the same name already lives in scope (the caller surfaces it as a hard collision).
func ReconcileBlueprint ¶ added in v0.6.0
func ReconcileBlueprint(r runner.Runner, desired intmodel.CellBlueprint) (ReconcileResult, error)
ReconcileBlueprint reconciles a desired `kind: CellBlueprint` by verifying its scope exists and persisting its document to the daemon-managed file (issue #620). Like ReconcileSecret it never auto-creates a missing scope: a Blueprint targets an existing realm/space/stack, so an unreachable scope is an apply-time error. The document is written write-through — re-applying overwrites and reports "updated".
func ReconcileCell ¶
ReconcileCell reconciles a desired cell state with the actual state. AC2 (#1185): apply must never report a success action (created/updated/unchanged) for a cell whose reconcile left it Failed, so the inner result is run through failedCellReconcileError before returning — see its doc for the rationale.
func ReconcileConfig ¶ added in v0.6.0
func ReconcileConfig(r runner.Runner, desired intmodel.CellConfig) (ReconcileResult, error)
ReconcileConfig reconciles a desired `kind: CellConfig` by verifying its own scope exists, resolving the referenced CellBlueprint from daemon storage, validating the config's structural slot fills against that blueprint's declared slots, and persisting the config document (issue #624). Like ReconcileSecret/ReconcileBlueprint it never auto-creates a missing scope, and the document is written write-through — re-applying overwrites and reports "updated". The slot-fill match runs here (not at parse time) because only the daemon can read the stored blueprint the config references.
func ReconcileContainer ¶
ReconcileContainer reconciles a desired container state with the actual state.
func ReconcileRealm ¶
ReconcileRealm reconciles a desired realm state with the actual state.
func ReconcileSecret ¶ added in v0.6.0
ReconcileSecret reconciles a desired `kind: Secret` by verifying its scope exists and persisting its bytes to the daemon-managed file (issue #619).
Unlike the hierarchy reconcilers, ReconcileSecret never auto-creates a missing parent: a Secret targets an existing scope, so an unreachable realm/space/stack/cell is an apply-time error, not an implicit create. The scope coordinates are validated for completeness at parse time (validateSecretScope); this function adds the reachability gate the AC requires (scope must exist). The secret material itself is written write-through — re-applying overwrites and reports "updated"; the daemon never reads the bytes back to diff them, keeping the never-round-tripped contract crisp.
func ReconcileSpace ¶
ReconcileSpace reconciles a desired space state with the actual state.
func ReconcileStack ¶
ReconcileStack reconciles a desired stack state with the actual state.