mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli): allow specifying name of provisioner daemon (#11077)
- Adds a --name argument to provisionerd start - Plumbs through name to integrated and external provisioners - Defaults to hostname if not specified for external, hostname-N for integrated - Adds cliutil.Hostname
This commit is contained in:
@@ -177,6 +177,8 @@ func (c *Client) provisionerJobLogsAfter(ctx context.Context, path string, after
|
||||
type ServeProvisionerDaemonRequest struct {
|
||||
// ID is a unique ID for a provisioner daemon.
|
||||
ID uuid.UUID `json:"id" format:"uuid"`
|
||||
// Name is the human-readable unique identifier for the daemon.
|
||||
Name string `json:"name" example:"my-cool-provisioner-daemon"`
|
||||
// Organization is the organization for the URL. At present provisioner daemons ARE NOT scoped to organizations
|
||||
// and so the organization ID is optional.
|
||||
Organization uuid.UUID `json:"organization" format:"uuid"`
|
||||
@@ -198,6 +200,7 @@ func (c *Client) ServeProvisionerDaemon(ctx context.Context, req ServeProvisione
|
||||
}
|
||||
query := serverURL.Query()
|
||||
query.Add("id", req.ID.String())
|
||||
query.Add("name", req.Name)
|
||||
for _, provisioner := range req.Provisioners {
|
||||
query.Add("provisioner", string(provisioner))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user