Skip to content

Commit

Permalink
Feat: Add user data to worker pools (#724)
Browse files Browse the repository at this point in the history
Resolve BE-2035
  • Loading branch information
nickpetrovic authored Nov 21, 2024
1 parent 18ce8fb commit e211a3b
Show file tree
Hide file tree
Showing 6 changed files with 368 additions and 351 deletions.
1 change: 1 addition & 0 deletions pkg/gateway/gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ message Machine {
string created = 13;
string agent_version = 14;
MachineMetrics machine_metrics = 15;
string user_data = 16;
}

message MachineMetrics {
Expand Down
1 change: 1 addition & 0 deletions pkg/gateway/services/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ func (gws *GatewayService) CreateMachine(ctx context.Context, in *pb.CreateMachi
ProviderName: string(*pool.Provider),
TailscaleUrl: gws.appConfig.Tailscale.ControlURL,
TailscaleAuth: gws.appConfig.Tailscale.AuthKey,
UserData: pool.UserData,
},
}, nil
}
Expand Down
1 change: 1 addition & 0 deletions pkg/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ type WorkerPoolConfig struct {
RequiresPoolSelector bool `key:"requiresPoolSelector" json:"requires_pool_selector"`
Priority int32 `key:"priority" json:"priority"`
Preemptable bool `key:"preemptable" json:"preemptable"`
UserData string `key:"userData" json:"user_data"`
}

type WorkerPoolJobSpecConfig struct {
Expand Down
Loading

0 comments on commit e211a3b

Please sign in to comment.