Documentation
¶
Overview ¶
Package localbackuppolicy owns the secret-free, generated contract between the Basement renderer and the native local backup lifecycle.
Index ¶
- Constants
- func ApplicationComposeProjectName(workloadRef, nodeRef string) string
- func ApplicationGraphDigest(source Source) (string, error)
- func ApplicationLogicalVolumeName(workloadRef, componentRef, volumeRef string) string
- func ApplicationRuntimeStartOrder(runtime ApplicationRuntime) ([]string, error)
- func ApplicationRuntimeStopOrder(runtime ApplicationRuntime) ([]string, error)
- func ApplicationVolumeName(workloadRef, nodeRef, componentRef, volumeRef string) string
- func ArtifactBytes(policy Policy) ([]byte, error)
- func Digest(raw []byte) (string, error)
- func IsRecognizedSnapshotSelection(containerPath string, excludes []string) bool
- func IsRecognizedSnapshotSelectionForCoreModule(coreModuleRef, containerPath string, excludes []string) bool
- func ManagedVolumeNames() []string
- func ManagedVolumeNamesForCoreModule(coreModuleRef string) ([]string, error)
- func ManagedVolumeNamesWithApplicationVolumes(applicationVolumes []ApplicationVolume) ([]string, error)
- func ManagedVolumeNamesWithApplicationVolumesForCoreModule(coreModuleRef string, applicationVolumes []ApplicationVolume) ([]string, error)
- func MarketplaceRuntimeFiles() []string
- func MarketplaceVolumeTarget(componentRef, volumeRef string) (string, bool)
- func RequireMarketplaceServiceGeneration(expected, observed MarketplaceService) error
- func RestorePathForOperation(operationID string) string
- func SourceDigest(source Source) (string, error)
- func StandaloneComposeLogicalVolumeName(componentRef, volumeRef string) string
- func StandaloneComposeProjectName(workloadRef, nodeRef string) string
- func StandaloneComposeVolumeName(workloadRef, nodeRef, componentRef, volumeRef string) string
- func ValidBackupDataClass(value string) bool
- func ValidComposeVolumeName(name string) bool
- func ValidPlatformVolumeName(name string) bool
- func ValidateRecoveryObjectives(objectives []RecoveryObjective) error
- func ValidateSnapshotPolicy(policy Policy) error
- func ValidateSourceProjection(source Source) error
- type ApplicationRuntime
- type ApplicationRuntimeComponent
- type ApplicationVolume
- type BackupSourceProjection
- type Document
- type MarketplaceService
- type MarketplaceServiceGeneration
- type Policy
- func Decode(raw []byte) (Policy, error)
- func New(stackID, siteRef, nodeRef string) (Policy, error)
- func NewForCoreModule(coreModuleRef, stackID, siteRef, nodeRef string) (Policy, error)
- func NewWithApplicationVolumes(stackID, siteRef, nodeRef string, applicationVolumes []ApplicationVolume) (Policy, error)
- func NewWithApplicationVolumesAndRuntimes(stackID, siteRef, nodeRef string, applicationVolumes []ApplicationVolume, ...) (Policy, error)
- func NewWithApplicationVolumesAndRuntimesForCoreModule(coreModuleRef, stackID, siteRef, nodeRef string, ...) (Policy, error)
- func (policy Policy) ApplicationSnapshotSources(workloads []string) ([]SnapshotSource, error)
- func (policy Policy) ClassifiedSnapshotSources() ([]SnapshotSource, error)
- func (policy Policy) RetentionForDataClass(class string) (*Retention, error)
- func (policy Policy) RuntimeProjection() Runtime
- func (policy Policy) SnapshotSources() ([]SnapshotSource, error)
- func (policy Policy) SourceProjection() Source
- func (policy Policy) ValidateSnapshotSourceSelection(selected []SnapshotSource) error
- type RecoveryObjective
- type RecoveryObjectiveProjection
- type Retention
- type Runtime
- type Schedule
- type SnapshotSource
- type Source
- func GovernedSource() Source
- func GovernedSourceForCoreModule(coreModuleRef string) (Source, error)
- func GovernedSourceWithApplicationVolumes(applicationVolumes []ApplicationVolume) (Source, error)
- func GovernedSourceWithApplicationVolumesAndRuntimes(applicationVolumes []ApplicationVolume, ...) (Source, error)
- func GovernedSourceWithApplicationVolumesAndRuntimesForCoreModule(coreModuleRef string, applicationVolumes []ApplicationVolume, ...) (Source, error)
- func (source Source) ComposeProject() string
- func (source Source) PhysicalVolumeName(logical string) string
- func (source Source) RuntimeProfile() Runtime
- func (source Source) WithMarketplaceServices(input []MarketplaceService) (Source, error)
- func (source Source) WithRuntimeVolumeNames(names map[string]string) (Source, error)
- type Target
Constants ¶
const ( APIVersion = "stackkit.local-kopia-runtime-policy/v1" Kind = "LocalKopiaRuntimePolicy" // CoreModuleRef and CoreLiteModuleRef are the only runtime profiles that // may own the local Kopia source. An empty Source.CoreModuleRef is retained // solely for decoding pre-profile Full-Core policy artifacts. CoreModuleRef = "stackkits-basement-core-runtime" CoreLiteModuleRef = "stackkits-basement-core-lite-runtime" CloudCoreModuleRef = "stackkits-cloud-core-standalone-runtime" ServiceRef = "kopia-agent" Hostname = "stackkit-basement-backup" ImageRef = "docker.io/kopia/kopia:0.18.2" ImageDigest = "sha256:b6cb1f09a5fa832a320ee06d7803e82cdd7f69ac6f61d76a0d55fbbf1495c043" Mode = "idle-until-owner-command" NetworkMode = "internal-no-peer" NetworkRef = "basement-backup" RequiredEvidenceRef = "basement-core-runtime-evidence" SourcePath = "/source/docker-volumes" RepositoryPath = "/app/repository" ConfigPath = "/app/config" CachePath = "/app/cache" RestoreStagingPath = "/restore-staging" RestoreStagingMode = "isolated-named-volume" RestoreStagingSourcePath = "/source/docker-volumes/stackkit-basement-core_kopia-restore-staging/_data" Custody = "owner-local" RuntimeMaterial = "owner-command" DockerDaemonRef = "docker-default" DockerDaemonEngine = "docker" DockerDaemonSocketPath = "/var/run/docker.sock" HostScope = "exclusive-stack-per-daemon" )
const MarketplaceComposeProject = "stackkit-marketplace"
const MarketplaceModuleRef = "stackkits-marketplace-coolify-runtime"
Marketplace keeps its installed project and volume identities when it joins the existing application backup graph. Only this native node installation uses the fixed project; adapter workloads retain their node-qualified names.
const MarketplaceRuntimeDirectory = ".stackkit/runtime/marketplace"
const RecoveryObjectiveProjectionAPIVersion = "stackkit.recovery-objective-projection/v1"
RecoveryObjectiveProjectionAPIVersion identifies the optional, derived recovery-objective extension on the compiler-owned backup-source input.
Variables ¶
This section is empty.
Functions ¶
func ApplicationComposeProjectName ¶ added in v0.53.1
func ApplicationGraphDigest ¶
ApplicationGraphDigest binds a persisted quiescence journal to the exact selected application graphs. Core-only policies intentionally return an empty digest and retain their legacy crash-consistent behavior.
func ApplicationLogicalVolumeName ¶ added in v0.53.1
func ApplicationRuntimeStartOrder ¶
func ApplicationRuntimeStartOrder(runtime ApplicationRuntime) ([]string, error)
ApplicationRuntimeStartOrder returns the dependency-first order derived from the selected graph. Callers must not replace it with label or ID order.
func ApplicationRuntimeStopOrder ¶
func ApplicationRuntimeStopOrder(runtime ApplicationRuntime) ([]string, error)
ApplicationRuntimeStopOrder returns the reverse dependency order used to stop application writers before their databases and infrastructure.
func ApplicationVolumeName ¶ added in v0.53.1
func ArtifactBytes ¶
ArtifactBytes returns the single canonical artifact representation. The renderer contract includes exactly one final LF; Decode rejects its absence, CRLF, blank lines, and all other whitespace variations.
func IsRecognizedSnapshotSelection ¶
IsRecognizedSnapshotSelection accepts the current governed backup selection and the immediately preceding v1 selection. The latter did not mention the restore-staging volume because that volume did not exist yet. Keeping this narrow compatibility rule allows pre-restore anchors to remain usable while every new snapshot excludes staged restore bytes.
func IsRecognizedSnapshotSelectionForCoreModule ¶
func IsRecognizedSnapshotSelectionForCoreModule(coreModuleRef, containerPath string, excludes []string) bool
IsRecognizedSnapshotSelectionForCoreModule accepts the current or pre-staging selection for one supported Core profile. Empty moduleRef is the legacy Full-Core encoding and is intentionally never inferred as Lite.
func ManagedVolumeNames ¶
func ManagedVolumeNames() []string
ManagedVolumeNames returns the exact Compose-qualified persistent volume allowlist that the local Kopia source may observe. Repository, cache, and restore-staging volumes are intentionally absent.
func ManagedVolumeNamesForCoreModule ¶
ManagedVolumeNamesForCoreModule returns the exact profile-owned Core names.
func ManagedVolumeNamesWithApplicationVolumes ¶
func ManagedVolumeNamesWithApplicationVolumes(applicationVolumes []ApplicationVolume) ([]string, error)
ManagedVolumeNamesWithApplicationVolumes returns the canonical Core names followed by selected application volume names in stable order.
func ManagedVolumeNamesWithApplicationVolumesForCoreModule ¶
func ManagedVolumeNamesWithApplicationVolumesForCoreModule(coreModuleRef string, applicationVolumes []ApplicationVolume) ([]string, error)
ManagedVolumeNamesWithApplicationVolumesForCoreModule returns the exact selected Core profile names followed by compiler-owned application names.
func MarketplaceRuntimeFiles ¶ added in v0.53.4
func MarketplaceRuntimeFiles() []string
MarketplaceRuntimeFiles is the private native installation closure. The database and managed volumes travel through the existing Kopia graph.
func MarketplaceVolumeTarget ¶ added in v0.53.1
MarketplaceVolumeTarget is the closed persistent installation layout. The compiler and native recipe both use it; a policy cannot add a similarly named volume or move a selected source to another container path.
func RequireMarketplaceServiceGeneration ¶ added in v0.53.13
func RequireMarketplaceServiceGeneration(expected, observed MarketplaceService) error
RequireMarketplaceServiceGeneration is the write/copy admission boundary. A same-name replacement is a new generation, not an automatic restore target.
func RestorePathForOperation ¶
RestorePathForOperation returns the non-caller-controlled staging directory for one portable lifecycle operation ID.
func SourceDigest ¶
SourceDigest binds restore execution to the exact historical/current volume selection without coupling it to unrelated runtime-policy revisions.
func StandaloneComposeLogicalVolumeName ¶
StandaloneComposeLogicalVolumeName is the shared unqualified Compose volume name derivation for one component volume.
func StandaloneComposeProjectName ¶
StandaloneComposeProjectName is the shared project-name derivation used by the runtime renderer, backup projection, and restore authority.
func StandaloneComposeVolumeName ¶
StandaloneComposeVolumeName is the shared Docker Compose-qualified volume name derivation for one Standalone-Compose application volume.
func ValidBackupDataClass ¶ added in v0.53.1
func ValidComposeVolumeName ¶
ValidComposeVolumeName reports whether name is a Compose-qualified volume identity the backup source may mount.
func ValidPlatformVolumeName ¶ added in v0.54.10
ValidPlatformVolumeName reports whether name is a node-observed physical project or volume identity of a platform-managed workload. Logical, compiler-owned names keep ValidComposeVolumeName.
func ValidateRecoveryObjectives ¶
func ValidateRecoveryObjectives(objectives []RecoveryObjective) error
ValidateRecoveryObjectives checks the canonical target-local encoding used by the local Kopia policy artifact. Runtime evidence is deliberately outside this type; these values are goals, not proof that recovery is possible.
func ValidateSnapshotPolicy ¶
ValidateSnapshotPolicy verifies a policy embedded in owner-signed snapshot evidence. New policy artifacts remain exact-current through Decode; this verifier additionally recognizes the pre-staging v1 snapshot selection so upgrades do not invalidate existing anchors.
func ValidateSourceProjection ¶
ValidateSourceProjection verifies the aggregate compiler projection before a renderer narrows it to one node-local policy instance.
Types ¶
type ApplicationRuntime ¶
type ApplicationRuntime struct {
RuntimeAdapterRef string `json:"runtimeAdapterRef,omitempty"`
WorkloadRef string `json:"workloadRef"`
SiteRef string `json:"siteRef"`
NodeRef string `json:"nodeRef"`
ComposeProject string `json:"composeProject"`
Components []ApplicationRuntimeComponent `json:"components"`
}
ApplicationRuntime is the compiler-owned component graph for one exact workload placement. The graph is retained in the source policy so lifecycle consumers cannot infer stop order from Docker names or mutable container labels.
func ApplicationRuntimesForTarget ¶
func ApplicationRuntimesForTarget(runtimes []ApplicationRuntime, siteRef, nodeRef string) ([]ApplicationRuntime, error)
ApplicationRuntimesForTarget narrows the compiler aggregate to one exact node-local placement while preserving the canonical graph encoding.
func CanonicalApplicationTransferRuntimes ¶ added in v0.54.10
func CanonicalApplicationTransferRuntimes(runtimes []ApplicationRuntime) ([]ApplicationRuntime, error)
CanonicalApplicationTransferRuntimes validates the selected runtime closure independently from persistent backup-source membership.
type ApplicationRuntimeComponent ¶
type ApplicationRuntimeComponent struct {
ComponentRef string `json:"componentRef"`
Role string `json:"role"`
Lifecycle string `json:"lifecycle"`
HealthFailure string `json:"healthFailure,omitempty"`
ImageRef string `json:"imageRef"`
ImageDigest string `json:"imageDigest"`
DependsOn []string `json:"dependsOn"`
}
ApplicationRuntimeComponent is one closed runtime graph node. ImageRef and ImageDigest are copied from the selected CUE runtime component; DependsOn is the only source used to derive quiescence order.
type ApplicationVolume ¶
type ApplicationVolume struct {
WorkloadRef string `json:"workloadRef"`
SiteRef string `json:"siteRef"`
NodeRef string `json:"nodeRef"`
ComposeProject string `json:"composeProject"`
ComponentRef string `json:"componentRef"`
VolumeRef string `json:"volumeRef"`
LogicalName string `json:"logicalName"`
VolumeName string `json:"volumeName"`
Target string `json:"target"`
Class string `json:"class"`
Backup bool `json:"backup"`
DataClasses []string `json:"dataClasses"`
DataBindingRef string `json:"dataBindingRef"`
BackupDataClass string `json:"backupDataClass,omitempty"`
// CacheSubpaths are CUE-declared regenerable subtrees below Target.
// Portable emergency exports omit them; Kopia keeps the whole volume.
CacheSubpaths []string `json:"cacheSubpaths,omitempty"`
}
ApplicationVolume is the canonical source-policy record for one persistent volume selected from a Standalone-Compose application workload. Identity and placement stay in the artifact so consumers cannot widen the source to a similarly named volume on another node.
func ApplicationVolumesForTarget ¶
func ApplicationVolumesForTarget(applicationVolumes []ApplicationVolume, siteRef, nodeRef string) ([]ApplicationVolume, error)
ApplicationVolumesForTarget narrows the compiler aggregate to one exact node-local policy target. It preserves the canonical order and deep-copy semantics used by the policy codec.
type BackupSourceProjection ¶
type BackupSourceProjection struct {
Source
RecoveryObjectiveProjection *RecoveryObjectiveProjection `json:"recoveryObjectiveProjection,omitempty"`
}
BackupSourceProjection is the existing flat Source input with an optional typed recovery extension. Embedding preserves the fieldless legacy JSON representation when the extension is absent.
type Document ¶
type Document struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Policy Policy `json:"policy"`
}
Document is the versioned on-disk local Kopia runtime policy artifact.
type MarketplaceService ¶ added in v0.53.13
type MarketplaceService struct {
SiteRef string `json:"siteRef"`
NodeRef string `json:"nodeRef"`
InstallationDigest string `json:"installationDigest"`
ServerUUID string `json:"serverUUID"`
ServiceUUID string `json:"serviceUUID"`
ComponentUUID string `json:"componentUUID"`
ComponentName string `json:"componentName"`
VolumeName string `json:"volumeName"`
ContainerTarget string `json:"containerTarget"`
BackupDataClass string `json:"backupDataClass"`
ExpectedGeneration MarketplaceServiceGeneration `json:"expectedGeneration"`
}
MarketplaceService selects upstream-owned data without impersonating a compiler workload or adopting a HostDeployment. It is sealed in the Plan's source policy; discovery cannot add sources at snapshot time.
func MarketplaceServicesForTarget ¶ added in v0.53.13
func MarketplaceServicesForTarget(input []MarketplaceService, site, node string) ([]MarketplaceService, error)
type MarketplaceServiceGeneration ¶ added in v0.53.13
type MarketplaceServiceGeneration struct {
DaemonID string `json:"daemonID"`
ContainerID string `json:"containerID"`
ImageID string `json:"imageID"`
VolumeCreatedAt string `json:"volumeCreatedAt"`
VolumeMountpoint string `json:"volumeMountpoint"`
VolumeMetadataDigest string `json:"volumeMetadataDigest"`
}
Docker has no immutable volume UUID. The retained container reference, daemon, exact mount and volume metadata must all survive this first slice.
type Policy ¶
type Policy struct {
StackID string `json:"stackId"`
Target Target `json:"target"`
Runtime Runtime `json:"runtime"`
Source Source `json:"source"`
Retention *Retention `json:"retention,omitempty"`
RetentionByDataClass map[string]Retention `json:"retentionByDataClass,omitempty"`
DataClasses []string `json:"dataClasses,omitempty"`
Schedule *Schedule `json:"schedule,omitempty"`
RecoveryObjectives []RecoveryObjective `json:"recoveryObjectives,omitempty"`
}
Policy binds the governed local Kopia runtime to one resolved Stack target.
func Decode ¶
Decode verifies strict JSON shape, governed values, and byte-for-byte canonical encoding before returning a policy.
func NewForCoreModule ¶
NewForCoreModule returns a policy bound to one of the finite local Core runtime profiles. Full-Core uses the pre-profile fieldless encoding for compatibility; CoreLite carries its explicit module binding.
func NewWithApplicationVolumes ¶
func NewWithApplicationVolumes(stackID, siteRef, nodeRef string, applicationVolumes []ApplicationVolume) (Policy, error)
NewWithApplicationVolumes returns the governed local Kopia policy with the selected Standalone-Compose application volumes attached to the target. Application records remain in the signed policy artifact so the runtime and restore authorities retain the CUE-derived ownership binding.
func NewWithApplicationVolumesAndRuntimes ¶
func NewWithApplicationVolumesAndRuntimes(stackID, siteRef, nodeRef string, applicationVolumes []ApplicationVolume, applicationRuntimes []ApplicationRuntime) (Policy, error)
NewWithApplicationVolumesAndRuntimes returns the governed policy with the exact selected application volumes and their compiler-owned runtime graphs.
func NewWithApplicationVolumesAndRuntimesForCoreModule ¶
func NewWithApplicationVolumesAndRuntimesForCoreModule(coreModuleRef, stackID, siteRef, nodeRef string, applicationVolumes []ApplicationVolume, applicationRuntimes []ApplicationRuntime) (Policy, error)
NewWithApplicationVolumesAndRuntimesForCoreModule returns a policy bound to one of the finite local Core runtime profiles. The profile controls the governed Core volume set; application volumes remain compiler-selected. Full-Core intentionally retains the fieldless legacy wire encoding so a profile-aware regeneration does not change an otherwise identical artifact; CoreLite remains explicitly identified in the source.
func (Policy) ApplicationSnapshotSources ¶ added in v0.54.10
func (policy Policy) ApplicationSnapshotSources(workloads []string) ([]SnapshotSource, error)
ApplicationSnapshotSources is an explicit complete application closure, independent of scheduled retention coverage. Core/other workloads never enter it.
func (Policy) ClassifiedSnapshotSources ¶ added in v0.53.1
func (policy Policy) ClassifiedSnapshotSources() ([]SnapshotSource, error)
ClassifiedSnapshotSources also admits lookup of signed historical class snapshots after the active retention ladder changes. It grants no writes.
func (Policy) RetentionForDataClass ¶ added in v0.53.1
func (Policy) RuntimeProjection ¶
RuntimeProjection returns a detached runtime projection suitable for execution adapters without allowing callers to mutate the decoded authority.
func (Policy) SnapshotSources ¶ added in v0.53.1
func (policy Policy) SnapshotSources() ([]SnapshotSource, error)
SnapshotSources keeps historical whole-root policies unchanged. Enabling a class override requires an explicit semantic class for every application volume; a missing class cannot silently inherit the configuration ladder.
func (Policy) SourceProjection ¶
SourceProjection returns a detached source projection suitable for lifecycle translation without allowing callers to mutate the decoded authority.
func (Policy) ValidateSnapshotSourceSelection ¶ added in v0.53.1
func (policy Policy) ValidateSnapshotSourceSelection(selected []SnapshotSource) error
ValidateSnapshotSourceSelection checks a signed historical selection against physical volume custody. A retention reclassification does not rename data.
type RecoveryObjective ¶
type RecoveryObjective struct {
BindingRef string `json:"bindingRef"`
WorkloadRefs []string `json:"workloadRefs"`
MaxDataLossSeconds int `json:"maxDataLossSeconds"`
RecoveryTimeSeconds int `json:"recoveryTimeSeconds"`
}
RecoveryObjective is the target-local projection of one CUE DataBinding recovery objective. WorkloadRefs are derived from the selected application volumes; callers must not treat them as an independent source of authority.
func RecoveryObjectivesForTarget ¶
func RecoveryObjectivesForTarget(projection *RecoveryObjectiveProjection, sourceApplications []ApplicationVolume, siteRef, nodeRef string) ([]RecoveryObjective, error)
RecoveryObjectivesForTarget narrows the logical-unit projection to the exact node-local application volumes selected by the runtime renderer.
type RecoveryObjectiveProjection ¶
type RecoveryObjectiveProjection struct {
APIVersion string `json:"apiVersion"`
Objectives []RecoveryObjective `json:"objectives"`
}
RecoveryObjectiveProjection carries only target-local recovery goals. It deliberately sits outside Source so SourceDigest remains bound to the physical data selection alone.
type Retention ¶
type Retention struct {
KeepDaily int `json:"keepDaily"`
KeepWeekly int `json:"keepWeekly"`
KeepMonthly int `json:"keepMonthly"`
KeepYearly int `json:"keepYearly"`
}
Retention carries the resolved foundation.#BackupRetentionV1 contract. Defaults are supplied by CUE. Nil preserves the historical manual policy; it must never be interpreted as a newly selected retention schedule.
type Runtime ¶
type Runtime struct {
ServiceRef string `json:"serviceRef"`
Hostname string `json:"hostname"`
Image string `json:"image"`
Mode string `json:"mode"`
NetworkMode string `json:"networkMode"`
NetworkRef string `json:"networkRef"`
HealthCommand []string `json:"healthCommand"`
RequiredEvidenceRef string `json:"requiredEvidenceRef"`
}
func GovernedRuntime ¶
func GovernedRuntime() Runtime
GovernedRuntime returns a detached copy of the exact local Kopia runtime.
type Schedule ¶
type Schedule struct {
Cadence string `json:"cadence"`
MinuteUTC int `json:"minuteUTC"`
HourUTC *int `json:"hourUTC,omitempty"`
WeekdayUTC string `json:"weekdayUTC,omitempty"`
JitterSeconds int `json:"jitterSeconds"`
}
Schedule is the resolved foundation.#BackupScheduleV1 UTC intent. It grants no execution authority; local scheduling requires separate Owner approval. Nil preserves historical policies that have no executable schedule intent.
func (Schedule) MaximumTriggerIntervalSeconds ¶
MaximumTriggerIntervalSeconds bounds adjacent scheduled UTC trigger slots, including jitter. It does not include backup duration or prove an RPO.
type SnapshotSource ¶ added in v0.53.1
type SnapshotSource struct {
VolumeName string `json:"volumeName"`
DataClass string `json:"dataClass"`
Path string `json:"path"`
ExcludePaths []string `json:"excludePaths,omitempty"`
}
SnapshotSource selects one already governed Docker volume. Per-volume Kopia sources let content expire independently in the same repository and custody. DataClasses on ApplicationVolume remain privacy labels, never retention keys.
func CloneSnapshotSources ¶ added in v0.53.1
func CloneSnapshotSources(sources []SnapshotSource) []SnapshotSource
type Source ¶
type Source struct {
Kind string `json:"kind"`
HostPath string `json:"hostPath"`
ContainerPath string `json:"containerPath"`
ReadOnly bool `json:"readOnly"`
CoreModuleRef string `json:"coreModuleRef,omitempty"`
ManagedVolumeNames []string `json:"managedVolumeNames"`
ApplicationVolumes []ApplicationVolume `json:"applicationVolumes,omitempty"`
ApplicationRuntimes []ApplicationRuntime `json:"applicationRuntimes,omitempty"`
MarketplaceServices []MarketplaceService `json:"marketplaceServices,omitempty"`
ExcludePaths []string `json:"excludePaths"`
RepositoryPath string `json:"repositoryPath"`
ConfigPath string `json:"configPath"`
CachePath string `json:"cachePath"`
Custody string `json:"custody"`
RuntimeMaterial string `json:"runtimeMaterial"`
// contains filtered or unexported fields
}
func GovernedSource ¶
func GovernedSource() Source
GovernedSource returns a detached copy of the exact read-only backup source. Exclusion order is a canonical contract: repository, config, then cache.
func GovernedSourceForCoreModule ¶
GovernedSourceForCoreModule returns the exact source for a supported Core runtime profile. New artifacts carry the selected module explicitly so the source allowlist cannot be widened by a consumer.
func GovernedSourceWithApplicationVolumes ¶
func GovernedSourceWithApplicationVolumes(applicationVolumes []ApplicationVolume) (Source, error)
GovernedSourceWithApplicationVolumes extends the CUE-owned Core source with exactly the selected application volumes. The static Core list and exclusion topology remain unchanged.
func GovernedSourceWithApplicationVolumesAndRuntimes ¶
func GovernedSourceWithApplicationVolumesAndRuntimes(applicationVolumes []ApplicationVolume, applicationRuntimes []ApplicationRuntime) (Source, error)
GovernedSourceWithApplicationVolumesAndRuntimes extends the CUE-owned Core source with selected application volumes and their closed runtime graphs.
func GovernedSourceWithApplicationVolumesAndRuntimesForCoreModule ¶
func GovernedSourceWithApplicationVolumesAndRuntimesForCoreModule(coreModuleRef string, applicationVolumes []ApplicationVolume, applicationRuntimes []ApplicationRuntime) (Source, error)
GovernedSourceWithApplicationVolumesAndRuntimesForCoreModule extends the selected finite Core profile with compiler-owned application volumes and runtime graphs.
func (Source) ComposeProject ¶
ComposeProject returns the finite runtime identity carried by an admitted source profile. Unknown profiles are rejected by ValidateSourceProjection.
func (Source) PhysicalVolumeName ¶ added in v0.53.8
func (Source) RuntimeProfile ¶
func (Source) WithMarketplaceServices ¶ added in v0.53.13
func (source Source) WithMarketplaceServices(input []MarketplaceService) (Source, error)
func (Source) WithRuntimeVolumeNames ¶ added in v0.53.8
WithRuntimeVolumeNames translates an already governed application selection to node-observed physical names. These runtime facts are not a second policy artifact; canonical snapshot paths and classes remain unchanged.