Cmd v1alpha1

apiVersion: tilt.dev/v1alpha1

import "github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1"

Cmd

Cmd represents a process on the host machine.

When the process exits, we will make a best-effort attempt (within OS limitations) to kill any spawned descendant processes.


CmdSpec

CmdSpec defines how to run a local command.


  • args ([]string)

    Command-line arguments. Must have length at least 1.

  • dir (string)

    Process working directory.

    If the working directory is not specified, the command is run in the default Tilt working directory.

  • env ([]string)

    Additional variables process environment.

    Expressed as a C-style array of strings of the form [“KEY1=VALUE1”, “KEY2=VALUE2”, …].

    Environment variables are layered on top of the environment variables that Tilt runs with.

  • readinessProbe (Probe)

    Periodic probe of service readiness.

  • restartOn (RestartOnSpec)

    Indicates objects that can trigger a restart of this command.

    When a restart is triggered, Tilt will try to gracefully shutdown any currently running process, waiting for it to exit before starting a new process. If the process doesn’t shutdown within the allotted time, Tilt will kill the process abruptly.

    Restarts can happen even if the command is already done.

    Logs of the current process after the restart are discarded.

    RestartOnSpec indicates the set of objects that can trigger a restart of this object.

    • restartOn.fileWatches ([]string), required

      A list of file watches that can trigger a restart.

CmdStatus

CmdStatus defines the observed state of Cmd

Based loosely on ContainerStatus in Kubernetes


  • ready (boolean)

    Specifies whether the command has passed its readiness probe.

    Terminating the command does not change its Ready state.

    Is always true when no readiness probe is defined.

  • running (CmdStateRunning)

    Details about a running process.

    CmdStateRunning is a running state of a local command.

    • running.pid (int32), required

      The process id of the command.

    • running.startedAt (MicroTime)

      Time at which the command was last started.

      MicroTime is version of Time with microsecond level precision.

  • terminated (CmdStateTerminated)

    Details about a terminated process.

    CmdStateTerminated is a terminated state of a local command.

    • terminated.exitCode (int32), required

      Exit status from the last termination of the command

    • terminated.pid (int32), required

      The process id of the command.

    • terminated.finishedAt (MicroTime)

      Time at which the command last terminated

      MicroTime is version of Time with microsecond level precision.

    • terminated.reason (string)

      (brief) reason the process is terminated

    • terminated.startedAt (MicroTime)

      Time at which previous execution of the command started

      MicroTime is version of Time with microsecond level precision.

  • waiting (CmdStateWaiting)

    Details about a waiting process.

    CmdStateWaiting is a waiting state of a local command.

    • waiting.reason (string)

      (brief) reason the process is not yet running.

CmdList

CmdList


  • apiVersion: tilt.dev/v1alpha1

  • kind: CmdList

  • metadata (ListMeta)

  • items ([]Cmd), required

Operations


get read the specified Cmd

HTTP Request

GET /apis/tilt.dev/v1alpha1/cmds/{name}

Parameters

  • name (in path): string, required

    name of the Cmd

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

get read status of the specified Cmd

HTTP Request

GET /apis/tilt.dev/v1alpha1/cmds/{name}/status

Parameters

  • name (in path): string, required

    name of the Cmd

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

list list or watch objects of kind Cmd

HTTP Request

GET /apis/tilt.dev/v1alpha1/cmds

Parameters

  • allowWatchBookmarks (in query): boolean

    allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.

  • continue (in query): string

    continue

  • fieldSelector (in query): string

    fieldSelector

  • labelSelector (in query): string

    labelSelector

  • limit (in query): integer

    limit

  • pretty (in query): string

    pretty

  • resourceVersion (in query): string

    resourceVersion

  • resourceVersionMatch (in query): string

    resourceVersionMatch

  • timeoutSeconds (in query): integer

    timeoutSeconds

  • watch (in query): boolean

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Response

200 (CmdList): OK

create create a Cmd

HTTP Request

POST /apis/tilt.dev/v1alpha1/cmds

Parameters

Response

200 (Cmd): OK

201 (Cmd): Created

202 (Cmd): Accepted

update replace the specified Cmd

HTTP Request

PUT /apis/tilt.dev/v1alpha1/cmds/{name}

Parameters

  • name (in path): string, required

    name of the Cmd

  • body: Cmd, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

201 (Cmd): Created

update replace status of the specified Cmd

HTTP Request

PUT /apis/tilt.dev/v1alpha1/cmds/{name}/status

Parameters

  • name (in path): string, required

    name of the Cmd

  • body: Cmd, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

201 (Cmd): Created

patch partially update the specified Cmd

HTTP Request

PATCH /apis/tilt.dev/v1alpha1/cmds/{name}

Parameters

  • name (in path): string, required

    name of the Cmd

  • body: Patch, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • force (in query): boolean

    force

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

patch partially update status of the specified Cmd

HTTP Request

PATCH /apis/tilt.dev/v1alpha1/cmds/{name}/status

Parameters

  • name (in path): string, required

    name of the Cmd

  • body: Patch, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • force (in query): boolean

    force

  • pretty (in query): string

    pretty

Response

200 (Cmd): OK

delete delete a Cmd

HTTP Request

DELETE /apis/tilt.dev/v1alpha1/cmds/{name}

Parameters

Response

200 (Status): OK

202 (Status): Accepted

deletecollection delete collection of Cmd

HTTP Request

DELETE /apis/tilt.dev/v1alpha1/cmds

Parameters

Response

200 (Status): OK