UIResource v1alpha1

apiVersion: tilt.dev/v1alpha1

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

UIResource

UIResource represents per-resource status data for rendering the web UI.

Treat this as a legacy data structure that’s more intended to make transition easier rather than a robust long-term API.


UIResourceSpec

UIResourceSpec is an empty struct. UIResource is a kludge for making Tilt’s internal status readable, not for specifying behavior.


UIResourceStatus

UIResourceStatus defines the observed state of UIResource


  • buildHistory ([]UIBuildTerminated)

    Past completed builds.

    UIBuildRunning respresents a finished build/update in the user interface.

    • buildHistory.error (string)

      A non-empty string if the build failed with an error.

    • buildHistory.finishTime (MicroTime)

      The time when the build finished.

      MicroTime is version of Time with microsecond level precision.

    • buildHistory.isCrashRebuild (boolean)

      A crash rebuild happens when Tilt live-updated a container, then the pod crashed, wiping out the live-updates. Tilt does a full build+deploy to reset the pod state to what’s on disk.

    • buildHistory.spanID (string)

      The log span where the build logs are stored in the logstore.

    • buildHistory.startTime (MicroTime)

      The time when the build started.

      MicroTime is version of Time with microsecond level precision.

    • buildHistory.warnings ([]string)

      A list of warnings encountered while running the build. These warnings will also be printed to the build’s log.

  • currentBuild (UIBuildRunning)

    The currently running build, if any.

    UIBuildRunning respresents an in-progress build/update in the user interface.

    • currentBuild.spanID (string)

      The log span where the build logs are stored in the logstore.

    • currentBuild.startTime (MicroTime)

      The time when the build started.

      MicroTime is version of Time with microsecond level precision.

  • endpointLinks ([]UIResourceLink)

    Links attached to this resource.

    UIResourceLink represents a link assocatiated with a UIResource.

    • endpointLinks.name (string)

      The display label on a URL.

    • endpointLinks.url (string)

      A URL to link to.

  • hasPendingChanges (boolean)

    True if the build was put in the pending queue due to file changes.

  • k8sResourceInfo (UIResourceKubernetes)

    Extra data about Kubernetes resources.

    UIResourceKubernetes contains status information specific to Kubernetes.

    • k8sResourceInfo.allContainersReady (boolean)

      Whether all the containers in the pod are currently healthy and have passed readiness checks.

    • k8sResourceInfo.displayNames ([]string)

      The list of all resources deployed in the Kubernetes deploy for this resource.

    • k8sResourceInfo.podCreationTime (Time)

      The creation time of the active pod.

      Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

    • k8sResourceInfo.podName (string)

      The name of the active pod.

      The active pod tends to be what Tilt defaults to for port-forwards, live-updates, etc.

    • k8sResourceInfo.podRestarts (int32)

      The number of pod restarts.

    • k8sResourceInfo.podStatus (string)

      The status of the active pod.

    • k8sResourceInfo.podStatusMessage (string)

      Extra error messaging around the current status of the active pod.

    • k8sResourceInfo.podUpdateStartTime (Time)

      The last update time of the active pod

      Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

    • k8sResourceInfo.spanID (string)

      The span where this pod stores its logs in the Tilt logstore.

  • lastDeployTime (MicroTime)

    The last time this resource was deployed.

    MicroTime is version of Time with microsecond level precision.

  • localResourceInfo (UIResourceLocal)

    Extra data about Local resources

    UIResourceLocal contains status information specific to local commands.

    • localResourceInfo.isTest (boolean)

      Whether this represents a test job.

    • localResourceInfo.pid (int64)

      The PID of the actively running local command.

  • pendingBuildSince (MicroTime)

    When the build was put in the pending queue.

    MicroTime is version of Time with microsecond level precision.

  • queued (boolean)

    Queued is a simple indicator of whether the resource is queued for an update.

  • runtimeStatus (string)

    The RuntimeStatus is a simple, high-level summary of the runtime state of a server.

    Not all resources run servers.

  • specs ([]UIResourceTargetSpec)

    Information about all the target specs that this resource summarizes.

    UIResourceTargetSpec represents the spec of a build or deploy that a resource summarizes.

    • specs.hasLiveUpdate (boolean)

      Whether the target has a live update assocated with it.

    • specs.id (string)

      The ID of the target.

    • specs.type (string)

      The type of the target.

  • triggerMode (int32)

    Bit mask representing whether this resource is run when: 1) When a file changes 2) When the resource initializes

  • updateStatus (string)

    The UpdateStatus is a simple, high-level summary of any update tasks to bring the resource up-to-date.

    If the resource runs a server, this may include both build tasks and live-update syncing.

UIResourceList

UIResourceList


  • apiVersion: tilt.dev/v1alpha1

  • kind: UIResourceList

  • metadata (ListMeta)

  • items ([]UIResource), required

Operations


get read the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • pretty (in query): string

    pretty

Response

200 (UIResource): OK

get read status of the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • pretty (in query): string

    pretty

Response

200 (UIResource): OK

list list or watch objects of kind UIResource

HTTP Request

GET /apis/tilt.dev/v1alpha1/uiresources

Parameters

Response

200 (UIResourceList): OK

create create an UIResource

HTTP Request

POST /apis/tilt.dev/v1alpha1/uiresources

Parameters

Response

200 (UIResource): OK

201 (UIResource): Created

202 (UIResource): Accepted

update replace the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • body: UIResource, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • pretty (in query): string

    pretty

Response

200 (UIResource): OK

201 (UIResource): Created

update replace status of the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • body: UIResource, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • pretty (in query): string

    pretty

Response

200 (UIResource): OK

201 (UIResource): Created

patch partially update the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • 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 (UIResource): OK

patch partially update status of the specified UIResource

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the UIResource

  • 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 (UIResource): OK

delete delete an UIResource

HTTP Request

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

Parameters

Response

200 (Status): OK

202 (Status): Accepted

deletecollection delete collection of UIResource

HTTP Request

DELETE /apis/tilt.dev/v1alpha1/uiresources

Parameters

Response

200 (Status): OK