store

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: EPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PersistentVolumeKindWorkload is a user or controller microservice volume.
	PersistentVolumeKindWorkload = "workload"
	// PersistentVolumeKindControlPlane is an on-node controller volume.
	PersistentVolumeKindControlPlane = "controlplane"
)
View Source
const (
	RuntimeScopeController = "controller"
	RuntimeScopeLocal      = "local"
)

Runtime container ref scopes stored in runtime_container_refs.scope.

View Source
const ModelRefKindWorkload = "workload"

ModelRefKindWorkload is the model_refs.kind value for a microservice catalog bind.

Variables

This section is empty.

Functions

func PersistentVolumeHostPath added in v1.1.0

func PersistentVolumeHostPath(diskDirectory, uuid, name, scope string) string

PersistentVolumeHostPath returns the on-disk directory for a persistent VOLUME.

Types

type ContainerState

type ContainerState struct {
	MsUUID     string
	Scope      string
	WorkloadID string
	SandboxID  string
}

ContainerState holds workload and sandbox container IDs for a microservice at a scope.

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB wraps the SQLite database connection

func GetInstance

func GetInstance() *DB

GetInstance returns the singleton DB instance

func (*DB) AddPersistentVolumeCleanupUUID added in v1.1.0

func (d *DB) AddPersistentVolumeCleanupUUID(uuid string) error

AddPersistentVolumeCleanupUUID records a reserved cleanup bit for later explicit orphan prune. It does not delete files or start a sweeper.

func (*DB) CheckLocalRegistryCollision added in v1.1.0

func (d *DB) CheckLocalRegistryCollision(reg *models.Registry) error

CheckLocalRegistryCollision returns a validate error when id exists with a different (type, url).

func (*DB) ClearAllControllerVolumeMounts

func (d *DB) ClearAllControllerVolumeMounts() error

ClearAllControllerVolumeMounts removes all controller volume mount rows (used on deprovision).

func (*DB) ClearControllerKnowledge added in v1.1.0

func (d *DB) ClearControllerKnowledge() error

ClearControllerKnowledge removes all controller Knowledge rows.

func (*DB) ClearControllerMicroserviceRuntimeFields

func (d *DB) ClearControllerMicroserviceRuntimeFields() error

ClearControllerMicroserviceRuntimeFields clears ephemeral runtime columns while keeping spec rows.

func (*DB) ClearControllerMicroservices

func (d *DB) ClearControllerMicroservices() error

ClearControllerMicroservices removes all controller microservice rows (used on deprovision).

func (*DB) ClearControllerModels added in v1.1.0

func (d *DB) ClearControllerModels() error

ClearControllerModels removes all controller model rows.

func (*DB) ClearControllerRegistries

func (d *DB) ClearControllerRegistries() error

ClearControllerRegistries removes all controller registry rows (used on deprovision).

func (*DB) ClearControllerRuntimeClasses added in v1.1.0

func (d *DB) ClearControllerRuntimeClasses() error

ClearControllerRuntimeClasses removes all fleet RuntimeClass rows.

func (*DB) ClearKnowledgeRefs added in v1.1.0

func (d *DB) ClearKnowledgeRefs(msUUID string) error

ClearKnowledgeRefs removes knowledge catalog binds for one microservice UUID.

func (*DB) ClearLocalRuntimeClasses

func (d *DB) ClearLocalRuntimeClasses() error

ClearLocalRuntimeClasses removes all RuntimeClass rows.

func (*DB) ClearLocalWorkloadRuntimeFields

func (d *DB) ClearLocalWorkloadRuntimeFields() error

ClearLocalWorkloadRuntimeFields clears runtime tracking on local workload rows.

func (*DB) ClearLocalWorkloads

func (d *DB) ClearLocalWorkloads() error

ClearLocalWorkloads removes all local workload records.

func (*DB) ClearRuntimeContainerRefs

func (d *DB) ClearRuntimeContainerRefs(scope string) error

ClearRuntimeContainerRefs removes runtime container ref rows. When scope is non-empty, only rows matching that scope are deleted.

func (*DB) ClearServiceAccountTokens

func (d *DB) ClearServiceAccountTokens() error

ClearServiceAccountTokens removes all token metadata rows.

func (*DB) Close

func (d *DB) Close() error

Close checkpoints the WAL (TRUNCATE) then closes the connection. Production path: internal/supervisor.(*Supervisor).Stop() calls store.GetInstance().Close() last.

func (*DB) Conn

func (d *DB) Conn() *sql.DB

Conn returns the underlying *sql.DB

func (*DB) CountKnowledgeRefs added in v1.1.0

func (d *DB) CountKnowledgeRefs(name string) (int, error)

CountKnowledgeRefs returns how many catalog binds exist for one Knowledge name.

func (*DB) CountModelRefs added in v1.1.0

func (d *DB) CountModelRefs(name string) (int, error)

CountModelRefs returns how many explicit refs exist for one model name.

func (*DB) DeleteAgentPrivateKey

func (d *DB) DeleteAgentPrivateKey() error

DeleteAgentPrivateKey removes the provisioned private key payload.

func (*DB) DeleteControllerVolumeMount

func (d *DB) DeleteControllerVolumeMount(uuid string) error

DeleteControllerVolumeMount removes a controller volume mount record by UUID.

func (*DB) DeleteEdgeGuardSignature

func (d *DB) DeleteEdgeGuardSignature() error

DeleteEdgeGuardSignature removes the stored edgeguard signature JWT.

func (*DB) DeleteKnowledgeRefs added in v1.1.0

func (d *DB) DeleteKnowledgeRefs(name string) error

DeleteKnowledgeRefs removes catalog binds for one Knowledge name.

func (*DB) DeleteLocalKnowledge added in v1.1.0

func (d *DB) DeleteLocalKnowledge(name string) error

DeleteLocalKnowledge deletes one local Knowledge by metadata.name.

func (*DB) DeleteLocalModel added in v1.1.0

func (d *DB) DeleteLocalModel(name string) error

DeleteLocalModel deletes one local model by metadata.name.

func (*DB) DeleteLocalRegistry

func (d *DB) DeleteLocalRegistry(id int) error

DeleteLocalRegistry deletes a local registry by ID.

func (*DB) DeleteLocalRuntimeClass

func (d *DB) DeleteLocalRuntimeClass(name string) error

DeleteLocalRuntimeClass deletes one RuntimeClass by name.

func (*DB) DeleteLocalWorkload

func (d *DB) DeleteLocalWorkload(id string) error

DeleteLocalWorkload removes a local workload record by id.

func (*DB) DeleteModelRefs added in v1.1.0

func (d *DB) DeleteModelRefs(name string) error

DeleteModelRefs removes explicit references for one model name.

func (*DB) DeletePersistentVolume added in v1.1.0

func (d *DB) DeletePersistentVolume(uuid, name string) error

DeletePersistentVolume removes one consumer row after the directory is destroyed.

func (*DB) DeleteRuntimeContainerRef

func (d *DB) DeleteRuntimeContainerRef(msUUID, scope string) error

DeleteRuntimeContainerRef removes the runtime container ref for msUUID at scope.

func (*DB) DeleteSharedPersistentVolumes added in v1.1.0

func (d *DB) DeleteSharedPersistentVolumes(name string) error

DeleteSharedPersistentVolumes removes every consumer row for a shared name.

func (*DB) DeleteSystemControlPlane

func (d *DB) DeleteSystemControlPlane() error

DeleteSystemControlPlane removes the singleton system control plane row.

func (*DB) DeleteWorkloadModelRefs added in v1.1.0

func (d *DB) DeleteWorkloadModelRefs(msUUID string) error

DeleteWorkloadModelRefs removes catalog binds for one microservice UUID.

func (*DB) DiskDirectory added in v1.1.0

func (d *DB) DiskDirectory() string

DiskDirectory is the directory that contains edgelet.db. Persistent VOLUME trees live beside the database under volumes/data and volumes/shared.

func (*DB) EnsureDefaultControllerRegistries

func (d *DB) EnsureDefaultControllerRegistries() error

EnsureDefaultControllerRegistries ensures docker.io and from_cache defaults exist. Hugging Face Hub is a local-only built-in and is not seeded here.

func (*DB) EnsureDefaultLocalRegistries

func (d *DB) EnsureDefaultLocalRegistries() error

EnsureDefaultLocalRegistries ensures built-in public registries exist (docker.io, from_cache, and Hugging Face Hub).

func (*DB) FindLocalWorkloadsByAppAndName

func (d *DB) FindLocalWorkloadsByAppAndName(application, name string) ([]*models.LocalDeployedMicroservice, error)

FindLocalWorkloadsByAppAndName finds local workloads by app/name.

func (*DB) GetAgentPrivateKey

func (d *DB) GetAgentPrivateKey() (privateKeyB64 string, found bool, err error)

GetAgentPrivateKey reads the provisioned private key payload (base64 JWK). Returns found=false when there is no stored key.

func (*DB) GetControllerKnowledgeByName added in v1.1.0

func (d *DB) GetControllerKnowledgeByName(name string) (*models.ControllerKnowledge, error)

GetControllerKnowledgeByName returns the fleet-desired Knowledge row for a unique name.

func (*DB) GetControllerKnowledgeByUUID added in v1.1.0

func (d *DB) GetControllerKnowledgeByUUID(uuid string) (*models.ControllerKnowledge, error)

GetControllerKnowledgeByUUID returns one fleet-desired Knowledge row by uuid.

func (*DB) GetControllerModelByName added in v1.1.0

func (d *DB) GetControllerModelByName(name string) (*models.ControllerModel, error)

GetControllerModelByName returns the fleet-desired model row for a unique name.

func (*DB) GetControllerRegistry added in v1.1.0

func (d *DB) GetControllerRegistry(id int) (*models.Registry, error)

GetControllerRegistry gets one controller registry by ID.

func (*DB) GetControllerRuntimeClass added in v1.1.0

func (d *DB) GetControllerRuntimeClass(name string) (*models.ControllerRuntimeClass, error)

GetControllerRuntimeClass returns the fleet-desired RuntimeClass row for a name.

func (*DB) GetControllerVolumeMountByUUID

func (d *DB) GetControllerVolumeMountByUUID(uuid string) (*VolumeMountRecord, error)

GetControllerVolumeMountByUUID retrieves a single controller volume mount record by UUID.

func (*DB) GetEdgeGuardSignature

func (d *DB) GetEdgeGuardSignature() (signature string, found bool, err error)

GetEdgeGuardSignature reads the current edgeguard hardware signature JWT. Returns found=false when there is no stored signature.

func (*DB) GetLocalKnowledge added in v1.1.0

func (d *DB) GetLocalKnowledge(name string) (*models.LocalKnowledge, error)

GetLocalKnowledge retrieves one local Knowledge by metadata.name.

func (*DB) GetLocalModel added in v1.1.0

func (d *DB) GetLocalModel(name string) (*models.LocalModel, error)

GetLocalModel retrieves one local model by metadata.name.

func (*DB) GetLocalRegistry

func (d *DB) GetLocalRegistry(id int) (*models.Registry, error)

GetLocalRegistry gets one local registry by ID.

func (*DB) GetLocalRuntimeClass

func (d *DB) GetLocalRuntimeClass(name string) (*models.LocalRuntimeClass, error)

GetLocalRuntimeClass returns one RuntimeClass by name.

func (*DB) GetLocalWorkload

func (d *DB) GetLocalWorkload(id string) (*models.LocalDeployedMicroservice, error)

GetLocalWorkload retrieves one local workload record by id.

func (*DB) GetPersistentVolume added in v1.1.0

func (d *DB) GetPersistentVolume(uuid, name string) (*PersistentVolumeRecord, error)

GetPersistentVolume returns one consumer row.

func (*DB) GetRuntimeContainerRef

func (d *DB) GetRuntimeContainerRef(msUUID, scope string) (*ContainerState, error)

GetRuntimeContainerRef returns the runtime container ref for msUUID at scope. Returns nil if not found or DB not opened.

func (*DB) GetSystemControlPlane

func (d *DB) GetSystemControlPlane() (*models.ControlPlaneDeployment, bool, error)

GetSystemControlPlane reads the singleton system control plane row. Returns found=false when no deployment is stored.

func (*DB) InsertKnowledgeRefs added in v1.1.0

func (d *DB) InsertKnowledgeRefs(msUUID string, names []string) error

InsertKnowledgeRefs records knowledge catalog binds for one microservice UUID.

func (*DB) IsManagedFleetRuntimeClass added in v1.1.0

func (d *DB) IsManagedFleetRuntimeClass(name string, provisioned bool) (bool, error)

IsManagedFleetRuntimeClass reports whether name is a controller-desired RuntimeClass while the node is provisioned. Unprovisioned nodes never treat a name as fleet-managed.

func (*DB) ListActiveServiceAccountTokens

func (d *DB) ListActiveServiceAccountTokens() ([]*models.ServiceAccountToken, error)

ListActiveServiceAccountTokens lists non-revoked token metadata.

func (*DB) ListKnowledgeRefs added in v1.1.0

func (d *DB) ListKnowledgeRefs(msUUID string) ([]string, error)

ListKnowledgeRefs returns knowledge names bound to one microservice UUID.

func (*DB) ListLocalKnowledge added in v1.1.0

func (d *DB) ListLocalKnowledge() ([]*models.LocalKnowledge, error)

ListLocalKnowledge returns all local Knowledge rows ordered by name.

func (*DB) ListLocalModels added in v1.1.0

func (d *DB) ListLocalModels() ([]*models.LocalModel, error)

ListLocalModels returns all local model rows ordered by name.

func (*DB) ListLocalRuntimeClasses

func (d *DB) ListLocalRuntimeClasses() ([]*models.LocalRuntimeClass, error)

ListLocalRuntimeClasses returns all applied RuntimeClass rows ordered by name.

func (*DB) ListLocalWorkloads

func (d *DB) ListLocalWorkloads() ([]*models.LocalDeployedMicroservice, error)

ListLocalWorkloads returns all local workload records.

func (*DB) ListPersistentVolumeCleanupUUIDs added in v1.1.0

func (d *DB) ListPersistentVolumeCleanupUUIDs() ([]string, error)

ListPersistentVolumeCleanupUUIDs returns UUIDs whose reserved cleanup bit may shorten the orphan-prune grace window.

func (*DB) ListPersistentVolumes added in v1.1.0

func (d *DB) ListPersistentVolumes() ([]PersistentVolumeRecord, error)

ListPersistentVolumes returns every consumer row.

func (*DB) ListPersistentVolumesForUUID added in v1.1.0

func (d *DB) ListPersistentVolumesForUUID(uuid string) ([]PersistentVolumeRecord, error)

ListPersistentVolumesForUUID returns every consumer row for one microservice.

func (*DB) ListPruneKeepKnowledgeNames added in v1.1.0

func (d *DB) ListPruneKeepKnowledgeNames(includeWorkloadRefs bool) ([]string, error)

ListPruneKeepKnowledgeNames returns names dangling prune must keep: fleet-desired controller Knowledge names plus catalog binds when includeWorkloadRefs is true.

func (*DB) ListPruneKeepModelNames added in v1.1.0

func (d *DB) ListPruneKeepModelNames(includeWorkloadRefs bool) ([]string, error)

ListPruneKeepModelNames returns names prune must keep on disk and as rows. Fleet-desired controller model names are always kept. Workload binds are included only when includeWorkloadRefs is true (watchdog excludes them).

func (*DB) ListReferencedModelNames added in v1.1.0

func (d *DB) ListReferencedModelNames() ([]string, error)

ListReferencedModelNames returns names that must be kept during dangling prune: fleet-desired controller model names plus any explicit model_refs rows. Unbound local model rows are not kept just because they exist.

func (*DB) ListServiceAccountTokens

func (d *DB) ListServiceAccountTokens() ([]*models.ServiceAccountToken, error)

ListServiceAccountTokens lists token metadata.

func (*DB) ListSharedPersistentVolumeConsumers added in v1.1.0

func (d *DB) ListSharedPersistentVolumeConsumers(name string) ([]PersistentVolumeRecord, error)

ListSharedPersistentVolumeConsumers returns every consumer of a shared name.

func (*DB) ListUnreferencedWorkloadVolumes added in v1.1.0

func (d *DB) ListUnreferencedWorkloadVolumes() ([]UnreferencedPersistentVolume, error)

ListUnreferencedWorkloadVolumes returns private orphans and shared names whose last consumer is unreferenced. Control-plane kind is omitted.

func (*DB) LoadAllControllerVolumeMounts

func (d *DB) LoadAllControllerVolumeMounts() ([]VolumeMountRecord, error)

LoadAllControllerVolumeMounts retrieves all controller volume mount records.

func (*DB) LoadControllerKnowledge added in v1.1.0

func (d *DB) LoadControllerKnowledge() ([]*models.ControllerKnowledge, error)

LoadControllerKnowledge retrieves all controller Knowledge rows ordered by name.

func (*DB) LoadControllerMicroservices

func (d *DB) LoadControllerMicroservices() ([]*models.Microservice, error)

LoadControllerMicroservices retrieves all controller microservices ordered by uuid.

func (*DB) LoadControllerModels added in v1.1.0

func (d *DB) LoadControllerModels() ([]*models.ControllerModel, error)

LoadControllerModels retrieves all controller model rows ordered by name.

func (*DB) LoadControllerRegistries

func (d *DB) LoadControllerRegistries() ([]*models.Registry, error)

LoadControllerRegistries retrieves all controller registries ordered by id.

func (*DB) LoadControllerRuntimeClasses added in v1.1.0

func (d *DB) LoadControllerRuntimeClasses() ([]*models.ControllerRuntimeClass, error)

LoadControllerRuntimeClasses retrieves all fleet RuntimeClass rows ordered by name.

func (*DB) LoadLocalRegistries

func (d *DB) LoadLocalRegistries() ([]*models.Registry, error)

LoadLocalRegistries retrieves all local registries ordered by id.

func (*DB) LookupRegistry added in v1.1.0

func (d *DB) LookupRegistry(id int) (*models.Registry, error)

LookupRegistry returns a local registry row, falling back to a controller registry.

func (*DB) MarkPersistentVolumesUnreferenced added in v1.1.0

func (d *DB) MarkPersistentVolumesUnreferenced(uuid string) error

MarkPersistentVolumesUnreferenced stamps consumer rows when a UUID leaves desired state. Files are not deleted.

func (*DB) NextLocalRegistryID added in v1.1.0

func (d *DB) NextLocalRegistryID() (int, error)

NextLocalRegistryID allocates the next local registry id after built-in rows.

func (*DB) Open

func (d *DB) Open(dir string) error

Open opens (or creates) the SQLite database at the given directory and runs migrations

func (*DB) PersistentVolumeKeepSet added in v1.1.0

func (d *DB) PersistentVolumeKeepSet(listedPrivateUUIDs, listedSharedNames []string) (PersistentVolumeKeepSet, error)

PersistentVolumeKeepSet builds the destroy keep-set from desired state, still-referenced ledger rows, and listed containers.

func (*DB) PrivateVolumeUUIDKept added in v1.1.0

func (d *DB) PrivateVolumeUUIDKept(uuid string, listedContainerUUIDs []string) (bool, error)

PrivateVolumeUUIDKept reports whether a private UUID is in the keep-set.

func (*DB) ReplaceAllControllerVolumeMounts

func (d *DB) ReplaceAllControllerVolumeMounts(records []VolumeMountRecord) error

ReplaceAllControllerVolumeMounts atomically replaces all controller volume mount rows. Used by the volume mount manager's full-save on every write.

func (*DB) ReplaceKnowledgeRefs added in v1.1.0

func (d *DB) ReplaceKnowledgeRefs(msUUID string, names []string) error

ReplaceKnowledgeRefs replaces knowledge catalog binds for one microservice UUID.

func (*DB) ReplaceWorkloadModelRefs added in v1.1.0

func (d *DB) ReplaceWorkloadModelRefs(msUUID string, names []string) error

ReplaceWorkloadModelRefs replaces catalog binds for one microservice UUID.

func (*DB) RevokeAllServiceAccountTokens

func (d *DB) RevokeAllServiceAccountTokens(revokedAtSec int64) error

RevokeAllServiceAccountTokens marks all tokens revoked.

func (*DB) RevokeServiceAccountToken

func (d *DB) RevokeServiceAccountToken(jti string, revokedAtSec int64) error

RevokeServiceAccountToken revokes a token by JTI.

func (*DB) SaveControllerKnowledge added in v1.1.0

func (d *DB) SaveControllerKnowledge(items []*models.ControllerKnowledge) error

SaveControllerKnowledge replaces all controller Knowledge rows in a single transaction. Identity is uuid (primary key) plus unique name.

func (*DB) SaveControllerMicroservices

func (d *DB) SaveControllerMicroservices(microservices []*models.Microservice) error

SaveControllerMicroservices replaces all controller microservice rows in a single transaction.

func (*DB) SaveControllerModels added in v1.1.0

func (d *DB) SaveControllerModels(items []*models.ControllerModel) error

SaveControllerModels replaces all controller model rows in a single transaction. Identity is uuid (primary key) plus unique name.

func (*DB) SaveControllerRegistries

func (d *DB) SaveControllerRegistries(registries []*models.Registry) error

SaveControllerRegistries replaces all controller registry rows in a single transaction.

func (*DB) SaveControllerRuntimeClasses added in v1.1.0

func (d *DB) SaveControllerRuntimeClasses(items []*models.ControllerRuntimeClass) error

SaveControllerRuntimeClasses replaces all fleet RuntimeClass rows in a single transaction. Empty list clears the table. Identity is unique name.

func (*DB) SeedPersistentVolumesFromDisk added in v1.1.0

func (d *DB) SeedPersistentVolumesFromDisk(diskDirectory, cpUUID string) error

SeedPersistentVolumesFromDisk records existing private data directories. It does not walk volumes/shared or delete files.

func (*DB) SharedVolumeNameKept added in v1.1.0

func (d *DB) SharedVolumeNameKept(name string, listedSharedNames []string) (bool, error)

SharedVolumeNameKept reports whether a shared name is in the keep-set.

func (*DB) UpsertAgentPrivateKey

func (d *DB) UpsertAgentPrivateKey(privateKeyB64 string) error

UpsertAgentPrivateKey stores the provisioned private key payload (base64 JWK).

func (*DB) UpsertControllerKnowledge added in v1.1.0

func (d *DB) UpsertControllerKnowledge(item *models.ControllerKnowledge) error

UpsertControllerKnowledge inserts or updates one controller Knowledge row by uuid. Name must stay unique across controller Knowledge rows.

func (*DB) UpsertControllerRegistry

func (d *DB) UpsertControllerRegistry(reg *models.Registry) error

UpsertControllerRegistry inserts or updates one controller registry row.

func (*DB) UpsertControllerVolumeMount

func (d *DB) UpsertControllerVolumeMount(rec VolumeMountRecord) error

UpsertControllerVolumeMount inserts or replaces a controller volume mount record.

func (*DB) UpsertEdgeGuardSignature

func (d *DB) UpsertEdgeGuardSignature(jwt string) error

UpsertEdgeGuardSignature stores the current edgeguard hardware signature JWT.

func (*DB) UpsertLocalKnowledge added in v1.1.0

func (d *DB) UpsertLocalKnowledge(k *models.LocalKnowledge) error

UpsertLocalKnowledge inserts or updates one local Knowledge row by metadata.name.

func (*DB) UpsertLocalModel added in v1.1.0

func (d *DB) UpsertLocalModel(m *models.LocalModel) error

UpsertLocalModel inserts or updates one local model row by metadata.name.

func (*DB) UpsertLocalRegistry

func (d *DB) UpsertLocalRegistry(reg *models.Registry) error

UpsertLocalRegistry inserts or updates one local registry row.

func (*DB) UpsertLocalRuntimeClass

func (d *DB) UpsertLocalRuntimeClass(rc *models.LocalRuntimeClass) error

UpsertLocalRuntimeClass inserts or updates one RuntimeClass row.

func (*DB) UpsertLocalWorkload

func (d *DB) UpsertLocalWorkload(ms *models.LocalDeployedMicroservice) error

UpsertLocalWorkload upserts a local workload record.

func (*DB) UpsertPersistentVolume added in v1.1.0

func (d *DB) UpsertPersistentVolume(uuid, name, kind, scope, hostPath string) error

UpsertPersistentVolume inserts or refreshes a consumer row while the UUID is in desired state. Shared rows from different UUIDs coexist for the same name.

func (*DB) UpsertPersistentVolumesFromMappings added in v1.1.0

func (d *DB) UpsertPersistentVolumesFromMappings(uuid, kind string, mappings []*models.VolumeMapping) error

UpsertPersistentVolumesFromMappings records VOLUME mappings only. BIND and VOLUME_MOUNT never create a shared claim.

func (*DB) UpsertRuntimeContainerRef

func (d *DB) UpsertRuntimeContainerRef(msUUID, scope, workloadID, sandboxID string) error

UpsertRuntimeContainerRef upserts a runtime container ref row.

func (*DB) UpsertServiceAccountToken

func (d *DB) UpsertServiceAccountToken(token *models.ServiceAccountToken) error

UpsertServiceAccountToken upserts token metadata.

func (*DB) UpsertSystemControlPlane

func (d *DB) UpsertSystemControlPlane(dep *models.ControlPlaneDeployment) error

UpsertSystemControlPlane stores the singleton system control plane row.

type PersistentVolumeKeepSet added in v1.1.0

type PersistentVolumeKeepSet struct {
	PrivateUUIDs []string
	SharedNames  []string
}

PersistentVolumeKeepSet is the set of private UUIDs and shared names that must not be destroyed. Listed containers are unioned with desired-state and still-referenced ledger rows.

type PersistentVolumeRecord added in v1.1.0

type PersistentVolumeRecord struct {
	UUID           string
	VolumeName     string
	Scope          string
	Kind           string
	HostPath       string
	CreatedAt      int64
	LastDesiredAt  int64
	UnreferencedAt *int64
}

PersistentVolumeRecord is one consumer row in the persistent volume ledger.

type UnreferencedPersistentVolume added in v1.1.0

type UnreferencedPersistentVolume struct {
	UUID             string
	VolumeName       string
	Scope            string
	Kind             string
	HostPath         string
	UnreferencedAt   int64
	LastConsumerUUID string
}

UnreferencedPersistentVolume is a workload claim whose last consumer has left desired state. Shared names appear once when every consumer is unreferenced.

type VolumeMountRecord

type VolumeMountRecord struct {
	UUID          string
	Name          string
	Version       float64
	Kind          string // "SECRET" or "CONFIGMAP"
	Checksum      string
	Microservices []string       // stored as JSON TEXT array
	Data          map[string]any // stored as JSON TEXT (key->base64 pairs)
	UpdatedAt     int64
}

VolumeMountRecord represents a single volume mount index entry. UUID, Name, Version, Kind, Checksum are real typed columns. Microservices and Data are JSON-serialized TEXT columns.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL