Skip to content

Commit

Permalink
feat: read overlays from the machine, preserve them during updates
Browse files Browse the repository at this point in the history
Change the layout of resources:
Now `SchematicConfiguration` is always defined per machine level.
`SchematicConfiguration` controller creates these resources for each
`ClusterMachine` by reading `ExtensionsConfiguration` and merging it
with the overlay information that was read from the `MachineStatus`.

`MachineStatus` controller now reads overlay information from extraInfo
of the schematic pseudo-extensions of the Talos nodes.

Signed-off-by: Artem Chernyshev <[email protected]>
  • Loading branch information
Unix4ever committed Apr 18, 2024
1 parent 340d078 commit f2b975b
Show file tree
Hide file tree
Showing 31 changed files with 2,516 additions and 1,093 deletions.
1,911 changes: 1,032 additions & 879 deletions client/api/omni/specs/omni.pb.go

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions client/api/omni/specs/omni.proto
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ message MachineStatusSpec {
}

message Schematic {
message Overlay {
string name = 1;
string image = 2;
}

// Id is the image factory schematic id used for the image generation.
//
// This must be be plain id computed solely from the system extensions, not including the kernel command line arguments, META content etc.
Expand All @@ -142,6 +147,10 @@ message MachineStatusSpec {
// InitialSchematic is the one first schematic the machine was using when it was connected to Omni for the first time.
// Omni will always reset schematic configuration to this default value when no explicit schematic configuration is set.
string initial_schematic = 4;

// Overlay contains the information about the overlay used during the machine image generation.
// It is used by SBC images.
Overlay overlay = 6;
}

message MaintenanceConfig {
Expand Down Expand Up @@ -947,6 +956,7 @@ message ExtensionsConfigurationSpec {
}

// ExtensionsConfigurationStatusSpec is the status of the generated schematic.
// Deprecated: to be removed.
message ExtensionsConfigurationStatusSpec {
enum Phase {
Unknown = 0;
Expand All @@ -959,6 +969,11 @@ message ExtensionsConfigurationStatusSpec {
repeated string extensions = 3;
}

// MachineExtensionsSpec is the extensions list to be used for a machine.
message MachineExtensionsSpec {
repeated string extensions = 1;
}

// MachineStatusMetricsSpec provides aggregated state of the number of registered and connected machines for the Omni instance.
message MachineStatusMetricsSpec {
uint32 registered_machines_count = 1;
Expand Down
Loading

0 comments on commit f2b975b

Please sign in to comment.