KubernetesDiscovery v1alpha1

apiVersion: tilt.dev/v1alpha1

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

KubernetesDiscovery

KubernetesDiscovery


KubernetesDiscoverySpec

KubernetesDiscoverySpec defines the desired state of KubernetesDiscovery


  • watches ([]KubernetesWatchRef), required

    Watches determine what resources are discovered.

    If a discovered resource (e.g. Pod) matches the KubernetesWatchRef UID exactly, it will be reported. If a discovered resource is transitively owned by the KubernetesWatchRef UID, it will be reported.

    KubernetesWatchRef is similar to v1.ObjectReference from the Kubernetes API and is used to determine what objects should be reported on based on discovery.

    • watches.namespace (string), required

      Namespace is the Kubernetes namespace for discovery. Required.

    • watches.uid (string), required

      UID is a Kubernetes object UID.

      It should either be the exact object UID or the transitive owner.

    • watches.name (string)

      Name is the Kubernetes object name.

      This is not directly used in discovery; it is extra metadata.

  • extraSelectors ([]LabelSelector)

    ExtraSelectors are label selectors that will force discovery of a Pod even if it does not match the AncestorUID.

    This should only be necessary in the event that a CRD creates Pods but does not set an owner reference to itself.

    A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

    • extraSelectors.matchExpressions ([]LabelSelectorRequirement)

      matchExpressions is a list of label selector requirements. The requirements are ANDed.

      A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

    • extraSelectors.matchExpressions.key (string), required

      Patch strategy: merge on key key

      key is the label key that the selector applies to.

    • extraSelectors.matchExpressions.operator (string), required

      operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

    • extraSelectors.matchExpressions.values ([]string)

      values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

    • extraSelectors.matchLabels (map[string]string)

      matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.

KubernetesDiscoveryStatus

KubernetesDiscoveryStatus defines the observed state of KubernetesDiscovery


  • pods ([]Pod), required

    Pods that have been discovered based on the criteria in the spec.

    *Pod is a collection of containers that can run on a host.

    The Tilt API representation mirrors the Kubernetes API very closely. Irrelevant data is not included, and some fields might be simplified.

    There might also be Tilt-specific status fields.*

    • pods.containers ([]Container), required

      Containers are the containers belonging to the Pod.

      *Container is an init or application container within a pod.

      The Tilt API representation mirrors the Kubernetes API very closely. Irrelevant data is not included, and some fields might be simplified.

      There might also be Tilt-specific status fields.*

    • pods.containers.id (string), required

      ID is the normalized container ID (the docker:// prefix is stripped).

    • pods.containers.image (string), required

      Image is the image the container is running.

    • pods.containers.name (string), required

      Name is the name of the container as defined in Kubernetes.

    • pods.containers.ports ([]int32), required

      Ports are exposed ports as extracted from the Pod spec.

      This is added by Tilt for convenience when managing port forwards.

    • pods.containers.ready (boolean), required

      Ready is true if the container is passing readiness checks (or has none defined).

    • pods.containers.restarts (int32), required

      Restarts is the number of times the container has restarted.

      This includes restarts before the Tilt daemon was started if the container was already running.

    • pods.containers.state (ContainerState), required

      State provides details about the container’s current condition.

      *ContainerState holds a possible state of container.

      Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.*

    • pods.containers.state.running (ContainerStateRunning), required

      Running provides details about a currently executing container.

      ContainerStateRunning is a running state of a container.

    • pods.containers.state.running.startedAt (Time), required

      StartedAt is the time the container began running.

      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.

    • pods.containers.state.terminated (ContainerStateTerminated), required

      Terminated provides details about an exited container.

      ContainerStateTerminated is a terminated state of a container.

    • pods.containers.state.terminated.exitCode (int32), required

      ExitCode is the exit status from the termination of the container.

      Any non-zero value indicates an error during termination.

    • pods.containers.state.terminated.finishedAt (Time), required

      FinishedAt is the time the container stopped running.

      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.

    • pods.containers.state.terminated.startedAt (Time), required

      StartedAt is the time the container began running.

      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.

    • pods.containers.state.terminated.reason (string)

      Reason is a (brief) reason the container stopped running.

    • pods.containers.state.waiting (ContainerStateWaiting), required

      Waiting provides details about a container that is not yet running.

      ContainerStateWaiting is a waiting state of a container.

    • pods.containers.state.waiting.reason (string), required

      Reason is a (brief) reason the container is not yet running.

    • pods.createdAt (Time), required

      CreatedAt is when the Pod was created.

      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.

    • pods.deleting (boolean), required

      Deleting indicates that the Pod is in the process of being removed.

    • pods.errors ([]string), required

      Errors are aggregated error messages for the Pod and its containers.

    • pods.name (string), required

      Name is the Pod name within the K8s cluster.

    • pods.namespace (string), required

      Namespace is the Pod namespace within the K8s cluster.

    • pods.phase (string), required

      Phase is where the Pod is at in its current lifecycle.

      Valid values for this are v1.PodPhase values from the Kubernetes API.

    • pods.status (string), required

      Status is a concise description for the Pod’s current state.

      This is based off the status output from kubectl get pod and is not an “enum-like” value.

    • pods.uid (string), required

      UID is the unique Pod UID within the K8s cluster.

    • pods.ancestorUID (string)

      AncestorUID is the UID from the WatchRef that matched this Pod.

      If the Pod matched based on extra label selectors, this will be empty.

    • pods.conditions ([]PodCondition)

      Conditions are various lifecycle conditions for this Pod.

      See also v1.PodCondition in the Kubernetes API.

      PodCondition is a lifecycle condition for a Pod.

    • pods.conditions.status (string), required

      Status is the current state of the condition (True, False, or Unknown).

      Valid values for this are v1.PodConditionStatus values from the Kubernetes API.

    • pods.conditions.type (string), required

      Type is the type of condition.

      Valid values for this are v1.PodConditionType values from the Kubernetes API.

    • pods.conditions.lastTransitionTime (Time)

      LastTransitionTime is the last time the status changed.

      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.

    • pods.conditions.message (string)

      Message is a human-readable description of the last status change.

    • pods.conditions.reason (string)

      Reason is a unique, one-word, CamelCase value for the cause of the last status change.

    • pods.initContainers ([]Container)

      InitContainers are containers executed prior to the Pod containers being executed.

      *Container is an init or application container within a pod.

      The Tilt API representation mirrors the Kubernetes API very closely. Irrelevant data is not included, and some fields might be simplified.

      There might also be Tilt-specific status fields.*

    • pods.initContainers.id (string), required

      ID is the normalized container ID (the docker:// prefix is stripped).

    • pods.initContainers.image (string), required

      Image is the image the container is running.

    • pods.initContainers.name (string), required

      Name is the name of the container as defined in Kubernetes.

    • pods.initContainers.ports ([]int32), required

      Ports are exposed ports as extracted from the Pod spec.

      This is added by Tilt for convenience when managing port forwards.

    • pods.initContainers.ready (boolean), required

      Ready is true if the container is passing readiness checks (or has none defined).

    • pods.initContainers.restarts (int32), required

      Restarts is the number of times the container has restarted.

      This includes restarts before the Tilt daemon was started if the container was already running.

    • pods.initContainers.state (ContainerState), required

      State provides details about the container’s current condition.

      *ContainerState holds a possible state of container.

      Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.*

    • pods.initContainers.state.running (ContainerStateRunning), required

      Running provides details about a currently executing container.

      ContainerStateRunning is a running state of a container.

    • pods.initContainers.state.running.startedAt (Time), required

      StartedAt is the time the container began running.

      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.

    • pods.initContainers.state.terminated (ContainerStateTerminated), required

      Terminated provides details about an exited container.

      ContainerStateTerminated is a terminated state of a container.

    • pods.initContainers.state.terminated.exitCode (int32), required

      ExitCode is the exit status from the termination of the container.

      Any non-zero value indicates an error during termination.

    • pods.initContainers.state.terminated.finishedAt (Time), required

      FinishedAt is the time the container stopped running.

      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.

    • pods.initContainers.state.terminated.startedAt (Time), required

      StartedAt is the time the container began running.

      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.

    • pods.initContainers.state.terminated.reason (string)

      Reason is a (brief) reason the container stopped running.

    • pods.initContainers.state.waiting (ContainerStateWaiting), required

      Waiting provides details about a container that is not yet running.

      ContainerStateWaiting is a waiting state of a container.

    • pods.initContainers.state.waiting.reason (string), required

      Reason is a (brief) reason the container is not yet running.

    • pods.podTemplateSpecHash (string)

      PodTemplateSpecHash is a hash of the Pod template spec.

      Tilt uses this to associate Pods with the build that triggered them.

  • monitorStartTime (MicroTime)

    MonitorStartTime is the timestamp of when Kubernetes resource discovery was started.

    It is zero if discovery has not been started yet.

    MicroTime is version of Time with microsecond level precision.

KubernetesDiscoveryList

KubernetesDiscoveryList


Operations


get read the specified KubernetesDiscovery

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the KubernetesDiscovery

  • pretty (in query): string

    pretty

Response

200 (KubernetesDiscovery): OK

get read status of the specified KubernetesDiscovery

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the KubernetesDiscovery

  • pretty (in query): string

    pretty

Response

200 (KubernetesDiscovery): OK

list list or watch objects of kind KubernetesDiscovery

HTTP Request

GET /apis/tilt.dev/v1alpha1/kubernetesdiscoveries

Parameters

Response

200 (KubernetesDiscoveryList): OK

create create a KubernetesDiscovery

HTTP Request

POST /apis/tilt.dev/v1alpha1/kubernetesdiscoveries

Parameters

Response

200 (KubernetesDiscovery): OK

201 (KubernetesDiscovery): Created

202 (KubernetesDiscovery): Accepted

update replace the specified KubernetesDiscovery

HTTP Request

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

Parameters

Response

200 (KubernetesDiscovery): OK

201 (KubernetesDiscovery): Created

update replace status of the specified KubernetesDiscovery

HTTP Request

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

Parameters

Response

200 (KubernetesDiscovery): OK

201 (KubernetesDiscovery): Created

patch partially update the specified KubernetesDiscovery

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the KubernetesDiscovery

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

patch partially update status of the specified KubernetesDiscovery

HTTP Request

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

Parameters

  • name (in path): string, required

    name of the KubernetesDiscovery

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

delete delete a KubernetesDiscovery

HTTP Request

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

Parameters

Response

200 (Status): OK

202 (Status): Accepted

deletecollection delete collection of KubernetesDiscovery

HTTP Request

DELETE /apis/tilt.dev/v1alpha1/kubernetesdiscoveries

Parameters

Response

200 (Status): OK