Skip to content

Commit

Permalink
feat: support setting extensions list in the cluster template
Browse files Browse the repository at this point in the history
Fixes: #45

Introduced new resource type `ExtensionsConfiguration` that allows
setting machine extensions list.

`SchematicConfiguration` is now readonly and is created by
`SchematicConfigurationController` from `ExtensionsConfiguration`
resource. It also ensures that schematic exists in the image factory by
calling the API.

This change is required to simplify the flow in the cluster templates
(no need to call `CreateSchematic` for each resource).

Export command support added as well.
Added cleanup hooks for the `ExtensionsConfiguration` for machine set, machine and cluster levels.

Changed the resource format to use `labels` instead of `target`. Now
it's the same as for config patches, except it doesn't merge several
resources, but gets the first one.

Signed-off-by: Artem Chernyshev <[email protected]>
  • Loading branch information
Unix4ever committed Mar 25, 2024
1 parent 176f9d9 commit 45e02fb
Show file tree
Hide file tree
Showing 38 changed files with 2,141 additions and 1,052 deletions.
1,858 changes: 998 additions & 860 deletions client/api/omni/specs/omni.pb.go

Large diffs are not rendered by default.

26 changes: 19 additions & 7 deletions client/api/omni/specs/omni.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ message MachineStatusSpec {

// Extensions is the list of extensions installed on the machine.
repeated string extensions = 3;

// 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;
}

message MaintenanceConfig {
Expand Down Expand Up @@ -932,14 +936,22 @@ message TalosExtensionsSpec {

// SchematicConfigurationSpec is the desired Image Factory schematic for a machine, machine set or a cluster.
message SchematicConfigurationSpec {
enum Target {
string schematic_id = 1;
}

// ExtensionsConfigurationSpec is the desired list of extensions to be installed on the machine or the set of machines.
message ExtensionsConfigurationSpec {
repeated string extensions = 1;
}

// ExtensionsConfigurationStatusSpec is the status of the generated schematic.
message ExtensionsConfigurationStatusSpec {
enum Phase {
Unknown = 0;
ClusterMachine = 1;
MachineSet = 2;
Cluster = 3;
Ready = 1;
Failed = 2;
}

string schematic_id = 1;

Target target = 2;
Phase phase = 1;
string error = 2;
}
Loading

0 comments on commit 45e02fb

Please sign in to comment.