github.com/tilt-dev/tilt@v0.36.0/pkg/apis/core/v1alpha1/generated.proto (about)

     1  /*
     2  Copyright 2020 The Tilt Dev Authors
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // This file was autogenerated by go-to-protobuf. Do not edit it manually!
    18  
    19  syntax = "proto2";
    20  
    21  package github.com.tilt_dev.tilt.pkg.apis.core.v1alpha1;
    22  
    23  import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    24  import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
    25  
    26  // Package-wide variables from generator "generated".
    27  option go_package = "github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1";
    28  
    29  // Cluster defines any runtime for running containers, in the broadest
    30  // sense of the word "runtime".
    31  //
    32  // +k8s:openapi-gen=true
    33  message Cluster {
    34    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    35  
    36    optional ClusterSpec spec = 2;
    37  
    38    optional ClusterStatus status = 3;
    39  }
    40  
    41  // Connection spec for an existing cluster.
    42  message ClusterConnection {
    43    // Defines connection to a Kubernetes cluster.
    44    optional KubernetesClusterConnection kubernetes = 1;
    45  
    46    // Defines connection to a Docker daemon.
    47    optional DockerClusterConnection docker = 2;
    48  }
    49  
    50  // Connection spec for an existing cluster.
    51  message ClusterConnectionStatus {
    52    // Defines connection to a Kubernetes cluster.
    53    optional KubernetesClusterConnectionStatus kubernetes = 1;
    54  }
    55  
    56  // ClusterList
    57  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    58  message ClusterList {
    59    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
    60  
    61    repeated Cluster items = 2;
    62  }
    63  
    64  // ClusterSpec defines how to find the cluster we're running
    65  // containers on.
    66  //
    67  // Tilt currently supports connecting to an existing Kubernetes
    68  // cluster or an existing Docker Daemon (for Docker Compose).
    69  message ClusterSpec {
    70    // Connection spec for an existing cluster.
    71    optional ClusterConnection connection = 1;
    72  
    73    // DefaultRegistry determines where images for this Cluster should
    74    // be pushed/pulled from if the Cluster itself does not provide local
    75    // registry hosting metadata.
    76    //
    77    // If not specified, no registry rewriting will occur, and the images will
    78    // be pushed/pulled to from the registry specified by the corresponding
    79    // image build directive (e.g. `docker_build` or `custom_build`).
    80    //
    81    // +optional
    82    optional RegistryHosting defaultRegistry = 2;
    83  }
    84  
    85  // ClusterStatus defines the observed state of Cluster
    86  message ClusterStatus {
    87    // The preferred chip architecture of the cluster.
    88    //
    89    // On Kubernetes, this will correspond to the kubernetes.io/arch annotation on
    90    // a node.
    91    //
    92    // On Docker, this will be the Architecture of the Docker daemon.
    93    //
    94    // Note that many clusters support multiple chipsets. This field doesn't intend
    95    // that this is the only architecture a cluster supports, only that it's one
    96    // of the architectures.
    97    optional string arch = 1;
    98  
    99    // An unrecoverable error connecting to the cluster.
   100    //
   101    // +optional
   102    optional string error = 2;
   103  
   104    // ConnectedAt indicates the time at which the cluster connection was established.
   105    //
   106    // Consumers can use this to detect when the underlying config has changed
   107    // and refresh their client/connection accordingly.
   108    //
   109    // +optional
   110    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime connectedAt = 3;
   111  
   112    // Registry describes a local registry that developer tools can
   113    // connect to. A local registry allows clients to load images into the local
   114    // cluster by pushing to this registry.
   115    //
   116    // +optional
   117    optional RegistryHosting registry = 4;
   118  
   119    // Connection status for an existing cluster.
   120    //
   121    // +optional
   122    optional ClusterConnectionStatus connection = 5;
   123  
   124    // Version is a cluster-provided, human-readable version string.
   125    //
   126    // +optional
   127    optional string version = 6;
   128  }
   129  
   130  // Cmd represents a process on the host machine.
   131  //
   132  // When the process exits, we will make a best-effort attempt
   133  // (within OS limitations) to kill any spawned descendant processes.
   134  //
   135  // +k8s:openapi-gen=true
   136  // +tilt:starlark-gen=true
   137  message Cmd {
   138    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   139  
   140    optional CmdSpec spec = 2;
   141  
   142    optional CmdStatus status = 3;
   143  }
   144  
   145  // CmdImage describes an image to build with an arbitrary shell command.
   146  // +k8s:openapi-gen=true
   147  message CmdImage {
   148    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   149  
   150    optional CmdImageSpec spec = 2;
   151  
   152    optional CmdImageStatus status = 3;
   153  }
   154  
   155  // CmdImageList
   156  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   157  message CmdImageList {
   158    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   159  
   160    repeated CmdImage items = 2;
   161  }
   162  
   163  // CmdImageSpec describes how the custom script builds images and where it puts them.
   164  message CmdImageSpec {
   165    // The named reference of the image.
   166    optional string ref = 7;
   167  
   168    // Command-line arguments. Must have length at least 1.
   169    repeated string args = 1;
   170  
   171    // Process working directory.
   172    //
   173    // If the working directory is not specified, the command is run
   174    // in the default Tilt working directory.
   175    //
   176    // +optional
   177    // +tilt:local-path=true
   178    optional string dir = 2;
   179  
   180    // Additional environment variables for the build process.
   181    //
   182    // Expressed as a C-style array of strings of the form ["KEY1=VALUE1", "KEY2=VALUE2", ...].
   183    //
   184    // Environment variables are layered on top of the environment variables
   185    // that Tilt runs with.
   186    //
   187    // +optional
   188    repeated string env = 10;
   189  
   190    // Names of image maps that this build depends on.
   191    //
   192    // The controller will watch all the image maps, and rebuild the image
   193    // if any of the maps resolve to a new image.
   194    //
   195    // +optional
   196    repeated string imageMaps = 3;
   197  
   198    // Specifies where the image is built. If not specified, we assume the image
   199    // was built to the local Docker image store.
   200    optional string outputMode = 4;
   201  
   202    // Tag we expect the image to be built with (we use this to check that
   203    // the expected image+tag has been created).
   204    //
   205    // If empty, we create an expected tag at the beginning of CustomBuild (and
   206    // export $EXPECTED_REF=name:expected_tag )
   207    //
   208    // +optional
   209    optional string outputTag = 5;
   210  
   211    // Specifies a filepath where the cmd script prints the result image ref.
   212    //
   213    // Tilt will read it out when we're done to find the image.
   214    //
   215    // +optional
   216    // +tilt:local-path=true
   217    optional string outputsImageRefTo = 6;
   218  
   219    // The name of the cluster we're building for.
   220    //
   221    // We'll use the cluster to determine the architecture of the image to build,
   222    // and the registry to build it for.
   223    //
   224    // If no cluster is specified, assumes the default cluster.
   225    //
   226    // +optional
   227    optional string cluster = 8;
   228  
   229    // Whether the cluster needs access to the image.
   230    //
   231    // If not specified, assumes we have to push up to the cluster.
   232    //
   233    // +optional
   234    optional string clusterNeeds = 9;
   235  }
   236  
   237  // CmdImageStateBuilding expresses that an image build is in-progress.
   238  message CmdImageStateBuilding {
   239    // The reason why the image is building.
   240    // +optional
   241    optional string reason = 1;
   242  
   243    // Time when the build started.
   244    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 2;
   245  }
   246  
   247  // CmdImageStateCompleted expresses when the image build is finished and
   248  // no new images need to be built.
   249  message CmdImageStateCompleted {
   250    // The reason why the image was built.
   251    // +optional
   252    optional string reason = 1;
   253  
   254    // Error message if the build failed.
   255    // +optional
   256    optional string error = 2;
   257  
   258    // Time when we started building an image.
   259    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 3;
   260  
   261    // Time when we finished building an image
   262    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 4;
   263  }
   264  
   265  // CmdImageStateWaiting expresses what we're waiting on to build an image.
   266  message CmdImageStateWaiting {
   267    // (brief) reason the image build is waiting.
   268    // +optional
   269    optional string reason = 1;
   270  }
   271  
   272  // CmdImageStatus describes the result of the image build.
   273  message CmdImageStatus {
   274    // A fully-qualified image reference of a built image, as seen from the local
   275    // network.
   276    //
   277    // Usually includes a name and an immutable tag.
   278    //
   279    // NB: If we're building to a particular registry, this may
   280    // have a different hostname from the Spec `Ref` field.
   281    //
   282    // +optional
   283    optional string ref = 1;
   284  
   285    // Details about a waiting image build.
   286    // +optional
   287    optional CmdImageStateWaiting waiting = 2;
   288  
   289    // Details about a building image.
   290    // +optional
   291    optional CmdImageStateBuilding building = 3;
   292  
   293    // Details about a finished image build.
   294    // +optional
   295    optional CmdImageStateCompleted completed = 4;
   296  }
   297  
   298  // CmdList
   299  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   300  message CmdList {
   301    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   302  
   303    repeated Cmd items = 2;
   304  }
   305  
   306  // CmdSpec defines how to run a local command.
   307  message CmdSpec {
   308    // Command-line arguments. Must have length at least 1.
   309    repeated string args = 1;
   310  
   311    // Process working directory.
   312    //
   313    // If the working directory is not specified, the command is run
   314    // in the default Tilt working directory.
   315    //
   316    // +optional
   317    // +tilt:local-path=true
   318    optional string dir = 2;
   319  
   320    // Additional variables process environment.
   321    //
   322    // Expressed as a C-style array of strings of the form ["KEY1=VALUE1", "KEY2=VALUE2", ...].
   323    //
   324    // Environment variables are layered on top of the environment variables
   325    // that Tilt runs with.
   326    //
   327    // +optional
   328    repeated string env = 3;
   329  
   330    // Periodic probe of service readiness.
   331    //
   332    // +optional
   333    optional Probe readinessProbe = 4;
   334  
   335    // Indicates objects that can trigger a restart of this command.
   336    //
   337    // When a restart is triggered, Tilt will try to gracefully shutdown any
   338    // currently running process, waiting for it to exit before starting a new
   339    // process. If the process doesn't shutdown within the allotted time, Tilt
   340    // will kill the process abruptly.
   341    //
   342    // Restarts can happen even if the command is already done.
   343    //
   344    // Logs of the current process after the restart are discarded.
   345    optional RestartOnSpec restartOn = 5;
   346  
   347    // Indicates objects that can trigger a start/restart of this command.
   348    //
   349    // Restarts behave the same as RestartOn. The key difference is that
   350    // a Cmd with any StartOn triggers will not have its command run until its
   351    // StartOn is satisfied.
   352    optional StartOnSpec startOn = 6;
   353  
   354    // Specifies how to disable this.
   355    //
   356    // +optional
   357    optional DisableSource disableSource = 7;
   358  }
   359  
   360  // CmdStateRunning is a running state of a local command.
   361  message CmdStateRunning {
   362    // The process id of the command.
   363    optional int32 pid = 1;
   364  
   365    // Time at which the command was last started.
   366    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 2;
   367  }
   368  
   369  // CmdStateTerminated is a terminated state of a local command.
   370  message CmdStateTerminated {
   371    // The process id of the command.
   372    optional int32 pid = 1;
   373  
   374    // Exit status from the last termination of the command
   375    optional int32 exitCode = 2;
   376  
   377    // Time at which previous execution of the command started
   378    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 3;
   379  
   380    // Time at which the command last terminated
   381    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 4;
   382  
   383    // (brief) reason the process is terminated
   384    // +optional
   385    optional string reason = 5;
   386  }
   387  
   388  // CmdStateWaiting is a waiting state of a local command.
   389  message CmdStateWaiting {
   390    // (brief) reason the process is not yet running.
   391    // +optional
   392    optional string reason = 1;
   393  }
   394  
   395  // CmdStatus defines the observed state of Cmd
   396  //
   397  // Based loosely on ContainerStatus in Kubernetes
   398  message CmdStatus {
   399    // Details about a waiting process.
   400    // +optional
   401    optional CmdStateWaiting waiting = 1;
   402  
   403    // Details about a running process.
   404    // +optional
   405    optional CmdStateRunning running = 2;
   406  
   407    // Details about a terminated process.
   408    // +optional
   409    optional CmdStateTerminated terminated = 3;
   410  
   411    // Specifies whether the command has passed its readiness probe.
   412    //
   413    // Terminating the command does not change its Ready state.
   414    //
   415    // Is always true when no readiness probe is defined.
   416    //
   417    // +optional
   418    optional bool ready = 4;
   419  
   420    // Details about whether/why this is disabled.
   421    // +optional
   422    optional DisableStatus disableStatus = 5;
   423  }
   424  
   425  // ConfigMap stores unstructured data that other controllers can read and write.
   426  //
   427  // Useful for sharing data from one system and subscribing to it from another.
   428  //
   429  // +k8s:openapi-gen=true
   430  // +tilt:starlark-gen=true
   431  message ConfigMap {
   432    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   433  
   434    // Data contains the configuration data.
   435    // Each key must consist of alphanumeric characters, '-', '_' or '.'.
   436    // +optional
   437    map<string, string> data = 2;
   438  }
   439  
   440  // Specifies a ConfigMap to control a DisableSource
   441  message ConfigMapDisableSource {
   442    // The name of the ConfigMap
   443    optional string name = 1;
   444  
   445    // The key where the enable/disable state is stored.
   446    optional string key = 2;
   447  }
   448  
   449  // ConfigMapList
   450  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   451  message ConfigMapList {
   452    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   453  
   454    repeated ConfigMap items = 2;
   455  }
   456  
   457  // Describes how a ToggleButton's state is stored in a ConfigMap.
   458  // The ConfigMap must be created separately - the ToggleButton will not automatically create it.
   459  message ConfigMapStateSource {
   460    // Name of the ConfigMap
   461    optional string name = 1;
   462  
   463    // Key within the ConfigMap
   464    optional string key = 2;
   465  
   466    // ConfigMap value corresponding to the button's "on" state.
   467    // If not specified, "true" will be used.
   468    // +optional
   469    optional string onValue = 3;
   470  
   471    // ConfigMap value corresponding to the button's "off" state
   472    // If not specified, "false" will be used.
   473    optional string offValue = 4;
   474  }
   475  
   476  // Container is an init or application container within a pod.
   477  //
   478  // The Tilt API representation mirrors the Kubernetes API very closely. Irrelevant data is
   479  // not included, and some fields might be simplified.
   480  //
   481  // There might also be Tilt-specific status fields.
   482  message Container {
   483    // Name is the name of the container as defined in Kubernetes.
   484    optional string name = 1;
   485  
   486    // ID is the normalized container ID (the `docker://` prefix is stripped).
   487    optional string id = 2;
   488  
   489    // Ready is true if the container is passing readiness checks (or has none defined).
   490    optional bool ready = 3;
   491  
   492    // Image is the image the container is running.
   493    optional string image = 4;
   494  
   495    // Restarts is the number of times the container has restarted.
   496    //
   497    // This includes restarts before the Tilt daemon was started if the container was already running.
   498    optional int32 restarts = 5;
   499  
   500    // State provides details about the container's current condition.
   501    optional ContainerState state = 6;
   502  
   503    // Ports are exposed ports as extracted from the Pod spec.
   504    //
   505    // This is added by Tilt for convenience when managing port forwards.
   506    repeated int32 ports = 7;
   507  }
   508  
   509  // ContainerLogStreamStatus defines the current status of each individual
   510  // container log stream.
   511  message ContainerLogStreamStatus {
   512    // The name of the container.
   513    optional string name = 1;
   514  
   515    // True when the stream is set up and streaming logs properly.
   516    //
   517    // +optional
   518    optional bool active = 2;
   519  
   520    // True when the logs are done stream and the container is terminated.
   521    //
   522    // +optional
   523    optional bool terminated = 3;
   524  
   525    // The last error message encountered while streaming.
   526    //
   527    // Empty when the stream is actively streaming or successfully terminated.
   528    //
   529    // +optional
   530    optional string error = 4;
   531  }
   532  
   533  // ContainerState holds a possible state of container.
   534  //
   535  // Only one of its members may be specified.
   536  // If none of them is specified, the default one is ContainerStateWaiting.
   537  message ContainerState {
   538    // Waiting provides details about a container that is not yet running.
   539    optional ContainerStateWaiting waiting = 1;
   540  
   541    // Running provides details about a currently executing container.
   542    optional ContainerStateRunning running = 2;
   543  
   544    // Terminated provides details about an exited container.
   545    optional ContainerStateTerminated terminated = 3;
   546  }
   547  
   548  // ContainerStateRunning is a running state of a container.
   549  message ContainerStateRunning {
   550    // StartedAt is the time the container began running.
   551    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
   552  }
   553  
   554  // ContainerStateTerminated is a terminated state of a container.
   555  message ContainerStateTerminated {
   556    // StartedAt is the time the container began running.
   557    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
   558  
   559    // FinishedAt is the time the container stopped running.
   560    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 2;
   561  
   562    // Reason is a (brief) reason the container stopped running.
   563    optional string reason = 3;
   564  
   565    // ExitCode is the exit status from the termination of the container.
   566    //
   567    // Any non-zero value indicates an error during termination.
   568    optional int32 exitCode = 4;
   569  }
   570  
   571  // ContainerStateWaiting is a waiting state of a container.
   572  message ContainerStateWaiting {
   573    // Reason is a (brief) reason the container is not yet running.
   574    optional string reason = 1;
   575  }
   576  
   577  // Aggregated disable status of DisableSources that belong to a resource.
   578  message DisableResourceStatus {
   579    // How many of the resource's sources are enabled.
   580    optional int32 enabledCount = 1;
   581  
   582    // How many of the resource's sources are disabled.
   583    optional int32 disabledCount = 2;
   584  
   585    // Whether this is currently disabled (if known)
   586    optional string state = 4;
   587  
   588    // All unique sources that control the resource's objects' disable status.
   589    repeated DisableSource sources = 3;
   590  }
   591  
   592  // Points at a thing that can control whether something is disabled
   593  message DisableSource {
   594    // Disabled by single ConfigMap value.
   595    optional ConfigMapDisableSource configMap = 2;
   596  
   597    // Disabled by multiple ConfigMap values, which must all be set to disabled
   598    // to disable the object.
   599    repeated ConfigMapDisableSource everyConfigMap = 3;
   600  }
   601  
   602  message DisableStatus {
   603    // Whether this is currently disabled. Deprecated in favor of `State`.
   604    optional bool disabled = 1;
   605  
   606    // The last time this status was updated.
   607    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 2;
   608  
   609    // The reason this status was updated.
   610    optional string reason = 3;
   611  
   612    // Whether this is currently disabled (if known)
   613    optional string state = 4;
   614  }
   615  
   616  message DockerClusterConnection {
   617    // The docker host to use.
   618    //
   619    // If not specified, will read the DOCKER_HOST env or use the default docker
   620    // host.
   621    optional string host = 1;
   622  }
   623  
   624  // DockerComposeLogStream
   625  // +k8s:openapi-gen=true
   626  message DockerComposeLogStream {
   627    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   628  
   629    optional DockerComposeLogStreamSpec spec = 2;
   630  
   631    optional DockerComposeLogStreamStatus status = 3;
   632  }
   633  
   634  // DockerComposeLogStreamList
   635  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   636  message DockerComposeLogStreamList {
   637    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   638  
   639    repeated DockerComposeLogStream items = 2;
   640  }
   641  
   642  // DockerComposeLogStreamSpec defines the desired state of DockerComposeLogStream
   643  message DockerComposeLogStreamSpec {
   644    // The name of the service to stream from.
   645    optional string service = 1;
   646  
   647    // A specification of the project the service belongs to.
   648    //
   649    // Each service spec keeps its own copy of the project spec.
   650    optional DockerComposeProject project = 2;
   651  }
   652  
   653  // DockerComposeLogStreamStatus defines the observed state of DockerComposeLogStream
   654  message DockerComposeLogStreamStatus {
   655    // When we last started the log streamer.
   656    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 1;
   657  
   658    // Contains an error message when the log streamer is in an error state.
   659    optional string error = 2;
   660  }
   661  
   662  message DockerComposeProject {
   663    // Configuration files to load.
   664    //
   665    // If both ConfigPaths and ProjectPath/YAML are specified,
   666    // the YAML is the source of truth, and the ConfigPaths
   667    // are used to print diagnostic information.
   668    repeated string configPaths = 1;
   669  
   670    // The base path of the docker-compose project.
   671    //
   672    // Expressed in docker-compose as --project-directory.
   673    //
   674    // When used on the command-line, the Docker Compose spec mandates that this
   675    // must be the directory of the first yaml file.  All additional yaml files are
   676    // evaluated relative to this project path.
   677    optional string projectPath = 2;
   678  
   679    // The docker-compose config YAML.
   680    //
   681    // Usually contains multiple services.
   682    //
   683    // If you have multiple docker-compose.yaml files, you can combine them into a
   684    // single YAML with `docker-compose -f file1.yaml -f file2.yaml config`.
   685    optional string yaml = 3;
   686  
   687    // The docker-compose project name.
   688    //
   689    // If omitted, the default is to use the NormalizedName of the ProjectPath
   690    // base name.
   691    optional string name = 4;
   692  
   693    // Path to an env file to use. Passed to docker-compose as `--env-file FILE`.
   694    optional string envFile = 5;
   695  
   696    // Optional docker-compose profiles to use.
   697    //
   698    // Services with defined profiles will only be included if their profile matches
   699    // one in this list.
   700    repeated string profiles = 6;
   701  
   702    // Optionally, pass --wait to docker compose up
   703    optional bool wait = 7;
   704  }
   705  
   706  // DockerComposeService represents a container orchestrated by Docker Compose.
   707  //
   708  // +k8s:openapi-gen=true
   709  message DockerComposeService {
   710    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   711  
   712    optional DockerComposeServiceSpec spec = 2;
   713  
   714    optional DockerComposeServiceStatus status = 3;
   715  }
   716  
   717  // DockerComposeServiceList
   718  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   719  message DockerComposeServiceList {
   720    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   721  
   722    repeated DockerComposeService items = 2;
   723  }
   724  
   725  // DockerComposeServiceSpec defines the desired state a Docker Compose container.
   726  message DockerComposeServiceSpec {
   727    // The name of the service to create.
   728    optional string service = 1;
   729  
   730    // A specification of the project the service belongs to.
   731    //
   732    // Each service spec keeps its own copy of the project spec.
   733    optional DockerComposeProject project = 2;
   734  
   735    // The image maps that this deploy depends on.
   736    repeated string imageMaps = 3;
   737  
   738    // Specifies how to disable this.
   739    //
   740    // +optional
   741    optional DisableSource disableSource = 4;
   742  }
   743  
   744  // DockerComposeServiceStatus defines the observed state of DockerComposeService,
   745  // continuing to watch the container after it starts.
   746  message DockerComposeServiceStatus {
   747    // Details about whether/why this is disabled.
   748    // +optional
   749    optional DisableStatus disableStatus = 1;
   750  
   751    // How docker binds container ports to the host network for this service.
   752    // +optional
   753    repeated DockerPortBinding portBindings = 2;
   754  
   755    // Current state of the container for this service.
   756    // +optional
   757    optional DockerContainerState containerState = 3;
   758  
   759    // Current container ID.
   760    // +optional
   761    optional string containerID = 4;
   762  
   763    // Current container name.
   764    // +optional
   765    optional string containerName = 8;
   766  
   767    // An error bringing up the container.
   768    //
   769    // +optional
   770    optional string applyError = 5;
   771  
   772    // Timestamp of when we last started bringing up this service in Docker Compose.
   773    //
   774    // +optional
   775    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastApplyStartTime = 6;
   776  
   777    // Timestamp of when we last finished bringing up this service in Docker Compose.
   778    //
   779    // When populated, must be equal or after the LastApplyStartTime field.
   780    //
   781    // +optional
   782    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastApplyFinishTime = 7;
   783  }
   784  
   785  // State of a standalone container in Docker.
   786  //
   787  // An apiserver-compatible representation of this struct:
   788  // https://pkg.go.dev/github.com/docker/docker/api/types#ContainerState
   789  message DockerContainerState {
   790    // String representation of the container state.
   791    // Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead".
   792    // +optional
   793    optional string status = 1;
   794  
   795    // Whether the container is running.
   796    // +optional
   797    optional bool running = 2;
   798  
   799    // Whether the container is in an error state.
   800    // +optional
   801    optional string error = 3;
   802  
   803    // The exit code, if the container has exited.
   804    // +optional
   805    optional int32 exitCode = 4;
   806  
   807    // When the container process started.
   808    // +optional
   809    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 5;
   810  
   811    // When the container process finished.
   812    // +optional
   813    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 6;
   814  
   815    // Status is one of Starting, Healthy or Unhealthy
   816    optional string healthStatus = 7;
   817  }
   818  
   819  // DockerImage describes an image to build with Docker.
   820  // +k8s:openapi-gen=true
   821  message DockerImage {
   822    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   823  
   824    optional DockerImageSpec spec = 2;
   825  
   826    optional DockerImageStatus status = 3;
   827  }
   828  
   829  // DockerImageList
   830  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
   831  message DockerImageList {
   832    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
   833  
   834    repeated DockerImage items = 2;
   835  }
   836  
   837  // DockerImageSpec describes how to build a Docker image with `docker_build`.
   838  //
   839  // Most fields of this spec directly correspond to the Docker CLI.
   840  message DockerImageSpec {
   841    // The named reference of the image.
   842    optional string ref = 12;
   843  
   844    // Dockerfile contains the complete contents of the Dockerfile.
   845    //
   846    // TODO(nick): We should also support referencing the Dockerfile as a path.
   847    //
   848    // +optional
   849    optional string dockerfileContents = 1;
   850  
   851    // Context specifies the Docker build context.
   852    //
   853    // Must be an absolute path on the local filesystem.
   854    //
   855    // +tilt:local-path=true
   856    optional string context = 2;
   857  
   858    // Ignores are filters on the Docker build context.
   859    //
   860    // The DockerImage controller will NOT read ignores from .dockerignore files.
   861    // Instead, all filters must be expressed in this field, which covers
   862    // .dockerignore files, ignore= lists in the tiltfile, only= lists in the
   863    // tiltfile, and more.
   864    repeated IgnoreDef contextIgnores = 16;
   865  
   866    // Args specifies the build arguments to the Dockerfile.
   867    //
   868    // Equivalent to `--build-arg` in the docker CLI.
   869    //
   870    // Each item should take the form "KEY" or "KEY=VALUE".
   871    //
   872    // +optional
   873    repeated string args = 3;
   874  
   875    // Target specifies the name of the stage in the Dockerfile to build.
   876    //
   877    // Equivalent to `--target` in the docker CLI.
   878    //
   879    // +optional
   880    optional string target = 4;
   881  
   882    // Pass SSH secrets to docker so it can clone private repos.
   883    //
   884    // https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds
   885    //
   886    // Equivalent to `--ssh` in the docker CLI.
   887    //
   888    // +optional
   889    repeated string sshAgentConfigs = 5;
   890  
   891    // Pass secrets to docker.
   892    //
   893    // https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information
   894    //
   895    // Equivalent to `--secret` in the Docker CLI.
   896    //
   897    // +optional
   898    repeated string secrets = 6;
   899  
   900    // Set the networking mode for the RUN instructions in the docker build.
   901    //
   902    // Equivalent to `--network` in the Docker CLI.
   903    //
   904    // +optional
   905    optional string network = 7;
   906  
   907    // Always attempt to pull a new version of the base image.
   908    //
   909    // Equivalent to `--pull` in the Docker CLI.
   910    //
   911    // +optional
   912    optional bool pull = 8;
   913  
   914    // Images to use as cache sources.
   915    //
   916    // Equivalent to `--cache-from` in the Docker CLI.
   917    repeated string cacheFrom = 9;
   918  
   919    // Platform specifies architecture information for target image.
   920    //
   921    // https://docs.docker.com/desktop/multi-arch/
   922    //
   923    // Equivalent to `--platform` in the Docker CLI.
   924    optional string platform = 10;
   925  
   926    // By default, Tilt creates a new temporary image reference for each build.
   927    // The user can also specify their own reference, to integrate with other tooling
   928    // (like build IDs for Jenkins build pipelines)
   929    //
   930    // Equivalent to the docker build --tag flag.
   931    //
   932    // +optional
   933    repeated string extraTags = 11;
   934  
   935    // Names of image maps that this build depends on.
   936    //
   937    // The controller will watch all the image maps, rebuild the image if any of
   938    // the maps resolve to a new image, and inject them into the dockerfile.
   939    //
   940    // +optional
   941    repeated string imageMaps = 13;
   942  
   943    // The name of the cluster we're building for.
   944    //
   945    // We'll use the cluster to determine the architecture of the image to build,
   946    // and the registry to build it for.
   947    //
   948    // If no cluster is specified, assumes the default cluster.
   949    //
   950    // +optional
   951    optional string cluster = 14;
   952  
   953    // Whether the cluster needs access to the image.
   954    //
   955    // If not specified, assumes we have to push up to the cluster.
   956    //
   957    // +optional
   958    optional string clusterNeeds = 15;
   959  
   960    // Other hosts to be added into a container’s /etc/hosts file
   961    //
   962    // https://docs.docker.com/engine/reference/commandline/build/#add-host
   963    //
   964    // Equivalent to `--add-host` in the Docker CLI.
   965    repeated string extraHosts = 17;
   966  }
   967  
   968  // DockerImageStageStatus gives detailed report of each stage
   969  // of the most recent image build.
   970  //
   971  // Most stages are derived from Buildkit's StatusResponse
   972  // https://github.com/moby/buildkit/blob/35fcb28a009d6454b2915a5c8084b25ad851cf38/api/services/control/control.proto#L108
   973  // but Tilt may synthesize its own stages for the steps it
   974  // owns.
   975  //
   976  // Stages may be executed in parallel.
   977  message DockerImageStageStatus {
   978    // A human-readable name of the stage.
   979    optional string name = 1;
   980  
   981    // Whether Buildkit was able to cache the stage based on inputs.
   982    // +optional
   983    optional bool cached = 2;
   984  
   985    // The timestamp when we started working on the stage.
   986    // +optional
   987    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 6;
   988  
   989    // The timetsamp when we completed the work on the stage.
   990    // +optional
   991    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 7;
   992  
   993    // Error message if the stage failed. If empty, the stage succeeded.
   994    // +optional
   995    optional string error = 5;
   996  }
   997  
   998  // DockerImageStateBuilding expresses that an image build is in-progress.
   999  message DockerImageStateBuilding {
  1000    // The reason why the image is building.
  1001    // +optional
  1002    optional string reason = 1;
  1003  
  1004    // Time when the build started.
  1005    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 2;
  1006  }
  1007  
  1008  // DockerImageStateCompleted expresses when the image build is finished and
  1009  // no new images need to be built.
  1010  message DockerImageStateCompleted {
  1011    // The reason why the image was built.
  1012    // +optional
  1013    optional string reason = 1;
  1014  
  1015    // Error message if the build failed.
  1016    // +optional
  1017    optional string error = 2;
  1018  
  1019    // Time when we started building an image.
  1020    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 3;
  1021  
  1022    // Time when we finished building an image
  1023    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 4;
  1024  }
  1025  
  1026  // DockerImageStateWaiting expresses what we're waiting on to build an image.
  1027  message DockerImageStateWaiting {
  1028    // (brief) reason the image build is waiting.
  1029    // +optional
  1030    optional string reason = 1;
  1031  }
  1032  
  1033  // DockerImageStatus defines the observed state of DockerImage
  1034  message DockerImageStatus {
  1035    // A fully-qualified image reference of a built image, as seen from the local
  1036    // network.
  1037    //
  1038    // Usually includes a name and an immutable tag.
  1039    //
  1040    // NB: If we're building to a particular registry, this may
  1041    // have a different hostname from the Spec `Ref` field.
  1042    //
  1043    // +optional
  1044    optional string ref = 1;
  1045  
  1046    // Details about a waiting image build.
  1047    // +optional
  1048    optional DockerImageStateWaiting waiting = 2;
  1049  
  1050    // Details about a building image.
  1051    // +optional
  1052    optional DockerImageStateBuilding building = 3;
  1053  
  1054    // Details about a finished image build.
  1055    // +optional
  1056    optional DockerImageStateCompleted completed = 4;
  1057  
  1058    // Status information about each individual build stage
  1059    // of the most recent image build.
  1060    repeated DockerImageStageStatus stageStatuses = 5;
  1061  }
  1062  
  1063  // How docker binds container ports to the host network
  1064  message DockerPortBinding {
  1065    // The port inside the container.
  1066    optional int32 containerPort = 1;
  1067  
  1068    // The port on the host machine where Docker running.
  1069    optional int32 hostPort = 2;
  1070  
  1071    // The IP on the host machine where Docker is binding the network.
  1072    optional string hostIP = 3;
  1073  }
  1074  
  1075  // ExecAction describes a "run in container" action.
  1076  message ExecAction {
  1077    // Command is the command line to execute inside the container, the working directory for the
  1078    // command  is root ('/') in the container's filesystem. The command is simply exec'd, it is
  1079    // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
  1080    // a shell, you need to explicitly call out to that shell.
  1081    // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
  1082    // +optional
  1083    repeated string command = 1;
  1084  }
  1085  
  1086  // Extension defines an extension that's evaluated on Tilt startup.
  1087  // +k8s:openapi-gen=true
  1088  // +tilt:starlark-gen=true
  1089  message Extension {
  1090    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1091  
  1092    optional ExtensionSpec spec = 2;
  1093  
  1094    optional ExtensionStatus status = 3;
  1095  }
  1096  
  1097  // ExtensionList
  1098  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1099  message ExtensionList {
  1100    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1101  
  1102    repeated Extension items = 2;
  1103  }
  1104  
  1105  // ExtensionRepo specifies a repo or folder where a set of extensions live.
  1106  // +k8s:openapi-gen=true
  1107  // +tilt:starlark-gen=true
  1108  message ExtensionRepo {
  1109    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1110  
  1111    optional ExtensionRepoSpec spec = 2;
  1112  
  1113    optional ExtensionRepoStatus status = 3;
  1114  }
  1115  
  1116  // ExtensionRepoList
  1117  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1118  message ExtensionRepoList {
  1119    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1120  
  1121    repeated ExtensionRepo items = 2;
  1122  }
  1123  
  1124  // ExtensionRepoSpec defines how to access the repo.
  1125  message ExtensionRepoSpec {
  1126    // The URL of the repo.
  1127    //
  1128    // Allowed:
  1129    // https: URLs that point to a public git repo
  1130    // file: URLs that point to a location on disk.
  1131    optional string url = 1;
  1132  
  1133    // A reference to sync the repo to. If empty, Tilt will always update
  1134    // the repo to the latest version.
  1135    // +optional
  1136    optional string ref = 2;
  1137  
  1138    // When set, this allows for automatically registering extensions within this repository in the
  1139    // following conditions:
  1140    //  - The extension is not already registered
  1141    //  - The first component of the load path matches the load_host of an extension repository.
  1142    // For example, an extension_repo call with load_host="internal" will support registering an
  1143    // extension at load time that looks like:
  1144    //  load("ext://internal/ext-name", "...")
  1145    // +optional
  1146    optional string loadHost = 3;
  1147  
  1148    // A path within the repository root that contains all extensions. By default, all extensions
  1149    // are expected to live at the repository root.
  1150    // Note that it is an error for this to be set for extension repositories using file:// URLs.
  1151    // For directory based extension repositories, you can add the subpath in the URL.
  1152    // +optional
  1153    optional string gitSubpath = 4;
  1154  }
  1155  
  1156  // ExtensionRepoStatus defines the observed state of ExtensionRepo
  1157  message ExtensionRepoStatus {
  1158    // Contains information about any problems loading the repo.
  1159    optional string error = 1;
  1160  
  1161    // The last time the repo was fetched and checked for validity.
  1162    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastFetchedAt = 2;
  1163  
  1164    // The path to the repo on local disk.
  1165    optional string path = 3;
  1166  
  1167    // The reference that we currently have checked out.
  1168    // On git, this is the commit hash.
  1169    // On file repos, this is empty.
  1170    optional string checkoutRef = 4;
  1171  
  1172    // If StaleReason is non-empty, that indicates the repo failed to fetch, but
  1173    // we were successfully able to use an on-disk copy.
  1174    optional string staleReason = 5;
  1175  }
  1176  
  1177  // ExtensionSpec defines the desired state of Extension
  1178  message ExtensionSpec {
  1179    // RepoName specifies the ExtensionRepo object where we should find this extension.
  1180    //
  1181    // The Extension controller should watch for changes to this repo, and
  1182    // may update if this repo is deleted or moved.
  1183    optional string repoName = 1;
  1184  
  1185    // RepoPath specifies the path to the extension directory inside the repo.
  1186    //
  1187    // Once the repo is downloaded, this path should point to a directory with a
  1188    // Tiltfile as the main "entrypoint" of the extension.
  1189    optional string repoPath = 2;
  1190  
  1191    // Arguments to the Tiltfile loaded by this extension.
  1192    //
  1193    // Arguments can be positional (['a', 'b', 'c']) or flag-based ('--to-edit=a').
  1194    // By default, a list of arguments indicates the list of services in the tiltfile
  1195    // that should be enabled.
  1196    //
  1197    // +optional
  1198    repeated string args = 3;
  1199  }
  1200  
  1201  // ExtensionStatus defines the observed state of Extension
  1202  message ExtensionStatus {
  1203    // Contains information about any problems loading the extension.
  1204    optional string error = 1;
  1205  
  1206    // The path to the extension on disk. This location should be shared
  1207    // and readable by all Tilt instances.
  1208    optional string path = 2;
  1209  }
  1210  
  1211  message FileEvent {
  1212    // Time is an approximate timestamp for a batch of file changes.
  1213    //
  1214    // This will NOT exactly match any inode attributes (e.g. ctime, mtime) at the filesystem level and is purely
  1215    // informational or for use as an opaque watermark.
  1216    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime time = 1;
  1217  
  1218    // SeenFiles is a list of paths which changed (create, modify, or delete).
  1219    repeated string seenFiles = 2;
  1220  }
  1221  
  1222  // FileWatch
  1223  // +k8s:openapi-gen=true
  1224  // +tilt:starlark-gen=true
  1225  message FileWatch {
  1226    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1227  
  1228    optional FileWatchSpec spec = 2;
  1229  
  1230    optional FileWatchStatus status = 3;
  1231  }
  1232  
  1233  // FileWatchList
  1234  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1235  message FileWatchList {
  1236    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1237  
  1238    repeated FileWatch items = 2;
  1239  }
  1240  
  1241  // FileWatchSpec defines the desired state of FileWatch
  1242  message FileWatchSpec {
  1243    // WatchedPaths are paths of directories or files to watch for changes to. It cannot be empty.
  1244    //
  1245    // +tilt:local-path=true
  1246    repeated string watchedPaths = 1;
  1247  
  1248    // Ignores are optional rules to filter out a subset of changes matched by WatchedPaths.
  1249    repeated IgnoreDef ignores = 2;
  1250  
  1251    // Specifies how to disable this.
  1252    //
  1253    // +optional
  1254    optional DisableSource disableSource = 3;
  1255  }
  1256  
  1257  // FileWatchStatus defines the observed state of FileWatch
  1258  message FileWatchStatus {
  1259    // MonitorStartTime is the timestamp of when filesystem monitor was started. It is zero if the monitor has not
  1260    // been started yet.
  1261    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime monitorStartTime = 1;
  1262  
  1263    // LastEventTime is the timestamp of the most recent file event. It is zero if no events have been seen yet.
  1264    //
  1265    // If the specifics of which files changed are not important, this field can be used as a watermark without
  1266    // needing to inspect FileEvents.
  1267    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastEventTime = 2;
  1268  
  1269    // FileEvents summarizes batches of file changes (create, modify, or delete) that have been seen in ascending
  1270    // chronological order. Only the most recent 20 events are included.
  1271    repeated FileEvent fileEvents = 3;
  1272  
  1273    // Error is set if there is a problem with the filesystem watch. If non-empty, consumers should assume that
  1274    // no filesystem events will be seen and that the file watcher is in a failed state.
  1275    optional string error = 4;
  1276  
  1277    // Details about whether/why this is disabled.
  1278    // +optional
  1279    optional DisableStatus disableStatus = 5;
  1280  }
  1281  
  1282  // Forward defines a port forward to execute on a given pod.
  1283  message Forward {
  1284    // The port to expose on the current machine.
  1285    //
  1286    // If not specified (or 0), a random free port will be chosen and can
  1287    // be discovered via the status once established.
  1288    //
  1289    // +optional
  1290    optional int32 localPort = 4;
  1291  
  1292    // The port on the Kubernetes pod to connect to. Required.
  1293    optional int32 containerPort = 3;
  1294  
  1295    // Optional host to bind to on the current machine.
  1296    //
  1297    // If not explicitly specified, uses the bind host of the tilt web UI (usually localhost).
  1298    //
  1299    // +optional
  1300    optional string host = 5;
  1301  
  1302    // Name to identify this port forward.
  1303    //
  1304    // +optional
  1305    optional string name = 6;
  1306  
  1307    // Path to include as part of generated links for port forward.
  1308    //
  1309    // +optional
  1310    optional string path = 7;
  1311  }
  1312  
  1313  message ForwardStatus {
  1314    // LocalPort is the port bound to on the system running Tilt.
  1315    optional int32 localPort = 1;
  1316  
  1317    // ContainerPort is the port in the container being forwarded.
  1318    optional int32 containerPort = 2;
  1319  
  1320    // Addresses that the forwarder is bound to.
  1321    //
  1322    // For example, a `localhost` host will bind to 127.0.0.1 and [::1].
  1323    repeated string addresses = 3;
  1324  
  1325    // StartedAt is the time at which the forward was initiated.
  1326    //
  1327    // If the forwarder is not running yet, this will be zero/empty.
  1328    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 4;
  1329  
  1330    // Error is a human-readable description if a problem was encountered
  1331    // while initializing the forward.
  1332    optional string error = 5;
  1333  }
  1334  
  1335  // HTTPGetAction describes an action based on HTTP Get requests.
  1336  message HTTPGetAction {
  1337    // Path to access on the HTTP server.
  1338    // +optional
  1339    optional string path = 1;
  1340  
  1341    // Name or number of the port to access on the container.
  1342    // Number must be in the range 1 to 65535.
  1343    optional int32 port = 2;
  1344  
  1345    // Host name to connect to, defaults to the pod IP. You probably want to set
  1346    // "Host" in httpHeaders instead.
  1347    // +optional
  1348    optional string host = 3;
  1349  
  1350    // Scheme to use for connecting to the host.
  1351    // Defaults to HTTP.
  1352    // +optional
  1353    optional string scheme = 4;
  1354  
  1355    // Custom headers to set in the request. HTTP allows repeated headers.
  1356    // +optional
  1357    repeated HTTPHeader httpHeaders = 5;
  1358  }
  1359  
  1360  // HTTPHeader describes a custom header to be used in HTTP probes
  1361  message HTTPHeader {
  1362    // The header field name
  1363    optional string name = 1;
  1364  
  1365    // The header field value
  1366    optional string value = 2;
  1367  }
  1368  
  1369  // Handler defines a specific action that should be taken in a probe.
  1370  message Handler {
  1371    // One and only one of the following should be specified.
  1372    // Exec specifies the action to take.
  1373    // +optional
  1374    optional ExecAction exec = 1;
  1375  
  1376    // HTTPGet specifies the http request to perform.
  1377    // +optional
  1378    optional HTTPGetAction httpGet = 2;
  1379  
  1380    // TCPSocket specifies an action involving a TCP port.
  1381    // TCP hooks not yet supported
  1382    // TODO: implement a realistic TCP lifecycle hook
  1383    // +optional
  1384    optional TCPSocketAction tcpSocket = 3;
  1385  }
  1386  
  1387  // Describes sets of file paths that the FileWatch should ignore.
  1388  message IgnoreDef {
  1389    // BasePath is the base path for the patterns. It cannot be empty.
  1390    //
  1391    // If no patterns are specified, everything under it will be recursively ignored.
  1392    //
  1393    // +tilt:local-path=true
  1394    optional string basePath = 1;
  1395  
  1396    // Patterns are dockerignore style rules. Absolute-style patterns will be rooted to the BasePath.
  1397    //
  1398    // See https://docs.docker.com/engine/reference/builder/#dockerignore-file.
  1399    repeated string patterns = 2;
  1400  }
  1401  
  1402  // ImageMap expresses the mapping from an image reference to a real, pushed
  1403  // image in an image registry that a container runtime can access.
  1404  //
  1405  // Another way to think about the ImageMap is that ImageMapSpec is a mutable
  1406  // image reference (where the image might not exist yet), but ImageMapStatus is
  1407  // an immutable image reference (where, if an image is specified, it always
  1408  // exists).
  1409  //
  1410  // ImageMap does not specify how the image is built or who is responsible for
  1411  // building this. But any API that builds images should produce an ImageMap.
  1412  //
  1413  // For example, a builder that builds to a local image registry might create
  1414  // a map from: 'my-apiserver:dev' to 'localhost:5000/my-apiserver:content-based-label'.
  1415  //
  1416  // ImageMap doesn't follow the usual Kubernetes-style API semantics
  1417  // (where the Status is the result of running the Spec). It's closer to a
  1418  // ConfigMap. Though the Status does represent a real runtime result
  1419  // (an image in a registry).
  1420  //
  1421  // +k8s:openapi-gen=true
  1422  message ImageMap {
  1423    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1424  
  1425    optional ImageMapSpec spec = 2;
  1426  
  1427    optional ImageMapStatus status = 3;
  1428  }
  1429  
  1430  // ImageMapList
  1431  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1432  message ImageMapList {
  1433    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1434  
  1435    repeated ImageMap items = 2;
  1436  }
  1437  
  1438  // ImageMapArgsOverride defines args to inject when the image
  1439  // is injected. Only applies to types that embed a v1.Container
  1440  // with a Command field.
  1441  //
  1442  // https://pkg.go.dev/k8s.io/api/core/v1#Container
  1443  message ImageMapOverrideArgs {
  1444    // A list of args strings.
  1445    repeated string args = 1;
  1446  }
  1447  
  1448  // ImageMapCommandOverride defines a command to inject when the image
  1449  // is injected. Only applies to types that embed a v1.Container
  1450  // with a Command field.
  1451  //
  1452  // https://pkg.go.dev/k8s.io/api/core/v1#Container
  1453  message ImageMapOverrideCommand {
  1454    // A list of command strings.
  1455    repeated string command = 1;
  1456  }
  1457  
  1458  // ImageMapSpec defines the desired state of ImageMap
  1459  message ImageMapSpec {
  1460    // A named image reference.
  1461    //
  1462    // Deployment tools expect this image reference to match an image
  1463    // in the YAML being deployed, and will replace that image reference.
  1464    //
  1465    // By default, this selector will match an image if the names match
  1466    // (tags on both the selector and the matched reference are ignored).
  1467    optional string selector = 1;
  1468  
  1469    // If specified, then tags on both the selector and the matched
  1470    // reference are used for matching. The selector will only
  1471    // match the reference if the tags match exactly.
  1472    //
  1473    // +optional
  1474    optional bool matchExact = 2;
  1475  
  1476    // If specified, then the selector will also match any strings
  1477    // in container env variables.
  1478    //
  1479    // +optional
  1480    optional bool matchInEnvVars = 3;
  1481  
  1482    // If specified, the injector will replace the 'command'
  1483    // field in the container when it replaces the image.
  1484    //
  1485    // +optional
  1486    optional ImageMapOverrideCommand overrideCommand = 4;
  1487  
  1488    // If specified, the injector will replace the 'args'
  1489    // field in the container when it replaces the image.
  1490    //
  1491    // +optional
  1492    optional ImageMapOverrideArgs overrideArgs = 5;
  1493  }
  1494  
  1495  // ImageMapStatus defines the observed state of ImageMap
  1496  message ImageMapStatus {
  1497    // A fully-qualified image reference, including a name and an immutable tag,
  1498    // as seen from the cluster container runtime that we're mapping this image to.
  1499    //
  1500    // NB: Container images often need to be referenced from different networks,
  1501    // including:
  1502    //
  1503    // 1) The cluster container runtime
  1504    // 2) The local network
  1505    // 3) The cluster network
  1506    //
  1507    // And each of these cases may have distinct URLs.
  1508    // We might deprecate this field and only use fields
  1509    // of the form `ImageFromX`.
  1510    //
  1511    // For more details on image references in different networks, see:
  1512    // https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry#specification-for-localregistryhosting-v1
  1513    optional string image = 1;
  1514  
  1515    // A fully-qualified image reference, including a name and an immutable tag,
  1516    // as seen from the local network.
  1517    optional string imageFromLocal = 3;
  1518  
  1519    // A fully-qualified image reference, including a name and an immutable tag,
  1520    // as seen from the cluster container runtime.
  1521    optional string imageFromCluster = 4;
  1522  
  1523    // Timestamp indicating when the image started building.
  1524    //
  1525    // Intended to be used to determine which file changes were picked up by the
  1526    // image build. We can assume that any file changes before this timestamp were
  1527    // definitely included in the image, and any file changes after this timestamp
  1528    // may not be included in the image.
  1529    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime buildStartTime = 2;
  1530  }
  1531  
  1532  // KubernetesApply specifies a blob of YAML to apply, and a set of ImageMaps
  1533  // that the YAML depends on.
  1534  //
  1535  // The KubernetesApply controller will resolve the ImageMaps into immutable image
  1536  // references. The controller will process the spec YAML, then apply it to the cluster.
  1537  // Those processing steps might include:
  1538  //
  1539  // - Injecting the resolved image references.
  1540  // - Adding custom labels so that Tilt can track the progress of the apply.
  1541  // - Modifying image pull rules to ensure the image is pulled correctly.
  1542  //
  1543  // The controller won't apply anything until all ImageMaps resolve to real images.
  1544  //
  1545  // The controller will watch all the image maps, and redeploy the entire YAML if
  1546  // any of the maps resolve to a new image.
  1547  //
  1548  // The status field will contain both the raw applied object, and derived fields
  1549  // to help other controllers figure out how to watch the apply progress.
  1550  //
  1551  // +k8s:openapi-gen=true
  1552  // +tilt:starlark-gen=true
  1553  message KubernetesApply {
  1554    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1555  
  1556    optional KubernetesApplySpec spec = 2;
  1557  
  1558    optional KubernetesApplyStatus status = 3;
  1559  }
  1560  
  1561  message KubernetesApplyCmd {
  1562    // Args are the command-line arguments for the apply command. Must have length >= 1.
  1563    repeated string args = 1;
  1564  
  1565    // Process working directory.
  1566    //
  1567    // If not specified, will default to Tilt working directory.
  1568    //
  1569    // +optional
  1570    // +tilt:local-path=true
  1571    optional string dir = 2;
  1572  
  1573    // Env are additional variables for the process environment.
  1574    //
  1575    // Environment variables are layered on top of the environment variables
  1576    // that Tilt runs with.
  1577    //
  1578    // +optional
  1579    repeated string env = 3;
  1580  }
  1581  
  1582  // KubernetesApplyList
  1583  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1584  message KubernetesApplyList {
  1585    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1586  
  1587    repeated KubernetesApply items = 2;
  1588  }
  1589  
  1590  // KubernetesApplySpec defines the desired state of KubernetesApply
  1591  message KubernetesApplySpec {
  1592    // YAML to apply to the cluster.
  1593    //
  1594    // Exactly one of YAML OR ApplyCmd MUST be provided.
  1595    //
  1596    // +optional
  1597    optional string yaml = 1;
  1598  
  1599    // Names of image maps that this applier depends on.
  1600    //
  1601    // The controller will watch all the image maps, and redeploy the entire YAML
  1602    // if any of the maps resolve to a new image.
  1603    //
  1604    // +optional
  1605    repeated string imageMaps = 2;
  1606  
  1607    // Descriptors of how to find images in the YAML.
  1608    //
  1609    // Needed when injecting images into CRDs.
  1610    //
  1611    // +optional
  1612    repeated KubernetesImageLocator imageLocators = 3;
  1613  
  1614    // The timeout on the apply operation.
  1615    //
  1616    // We've had problems with both:
  1617    // 1) CRD apiservers that take an arbitrarily long time to apply, and
  1618    // 2) Infinite loops in the apimachinery
  1619    // So we offer the ability to set a timeout on Kubernetes apply operations.
  1620    //
  1621    // The default timeout is 30s.
  1622    //
  1623    // +optional
  1624    optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration timeout = 4;
  1625  
  1626    // KubernetesDiscoveryTemplateSpec describes how we discover pods
  1627    // for resources created by this Apply.
  1628    //
  1629    // If not specified, the KubernetesDiscovery controller will listen to all pods,
  1630    // and follow owner references to find the pods owned by these resources.
  1631    //
  1632    // +optional
  1633    optional KubernetesDiscoveryTemplateSpec kubernetesDiscoveryTemplateSpec = 5;
  1634  
  1635    // PortForwardTemplateSpec describes the data model for port forwards
  1636    // that KubernetesApply should set up.
  1637    //
  1638    // Underneath the hood, we'll create a KubernetesDiscovery object that finds
  1639    // the pods and sets up the port-forwarding. Only one PortForward will be
  1640    // active at a time.
  1641    //
  1642    // +optional
  1643    optional PortForwardTemplateSpec portForwardTemplateSpec = 6;
  1644  
  1645    // PodLogStreamTemplateSpec describes the data model for PodLogStreams
  1646    // that KubernetesApply should set up.
  1647    //
  1648    // Underneath the hood, we'll create a KubernetesDiscovery object that finds
  1649    // the pods and sets up the pod log streams.
  1650    //
  1651    // If no template is specified, the controller will stream all
  1652    // pod logs available from the apiserver.
  1653    //
  1654    // +optional
  1655    optional PodLogStreamTemplateSpec podLogStreamTemplateSpec = 7;
  1656  
  1657    // DiscoveryStrategy describes how we set up pod watches for the applied
  1658    // resources. This affects all systems that attach to pods, including
  1659    // PortForwards, PodLogStreams, resource readiness, and live-updates.
  1660    //
  1661    // +optional
  1662    optional string discoveryStrategy = 8;
  1663  
  1664    // Specifies how to disable this.
  1665    //
  1666    // +optional
  1667    optional DisableSource disableSource = 9;
  1668  
  1669    // ApplyCmd is a custom command to execute to deploy entities to the Kubernetes cluster.
  1670    //
  1671    // The command must be idempotent, e.g. it must not fail if some or all entities already exist.
  1672    //
  1673    // The ApplyCmd MUST return valid Kubernetes YAML for the entities it applied to the cluster.
  1674    //
  1675    // Exactly one of YAML OR ApplyCmd MUST be provided.
  1676    //
  1677    // +optional
  1678    optional KubernetesApplyCmd applyCmd = 10;
  1679  
  1680    // RestartOn determines external triggers that will result in an apply.
  1681    //
  1682    // +optional
  1683    optional RestartOnSpec restartOn = 11;
  1684  
  1685    // DeleteCmd is a custom command to execute to delete entities created by ApplyCmd and clean up any
  1686    // additional state.
  1687    //
  1688    // +optional
  1689    optional KubernetesApplyCmd deleteCmd = 12;
  1690  
  1691    // Cluster name to determine the Kubernetes cluster.
  1692    //
  1693    // If not provided, "default" will be used.
  1694    //
  1695    // +optional
  1696    optional string cluster = 13;
  1697  }
  1698  
  1699  // KubernetesApplyStatus defines the observed state of KubernetesApply
  1700  message KubernetesApplyStatus {
  1701    // The result of applying the YAML to the cluster. This should contain
  1702    // UIDs for the applied resources.
  1703    //
  1704    // +optional
  1705    optional string resultYAML = 1;
  1706  
  1707    // An error applying the YAML.
  1708    //
  1709    // If there was an error, than ResultYAML should be empty (and vice versa).
  1710    //
  1711    // +optional
  1712    optional string error = 2;
  1713  
  1714    // Timestamp of we last finished applying this YAML to the cluster.
  1715    //
  1716    // When populated, must be equal or after the LastApplyStartTime field.
  1717    //
  1718    // TODO(nick): In v1, we may rename this to LastApplyFinishTime, which
  1719    // is more consistent with how we name this in other API objects.
  1720    //
  1721    // +optional
  1722    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastApplyTime = 3;
  1723  
  1724    // Timestamp of when we last started applying this YAML to the cluster.
  1725    //
  1726    // +optional
  1727    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastApplyStartTime = 6;
  1728  
  1729    // A base64-encoded hash of all the inputs to the apply.
  1730    //
  1731    // We added this so that more procedural code can determine whether
  1732    // their updates have been applied yet or not by the reconciler. But any code
  1733    // using it this way should note that the reconciler may "skip" an update
  1734    // (e.g., if two images get updated in quick succession before the reconciler
  1735    // injects them into the YAML), so a particular ApplieInputHash might never appear.
  1736    //
  1737    // +optional
  1738    optional string appliedInputHash = 4;
  1739  
  1740    // Details about whether/why this is disabled.
  1741    // +optional
  1742    optional DisableStatus disableStatus = 5;
  1743  
  1744    // Conditions based on the result of the apply.
  1745    //
  1746    // +optional
  1747    repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 7;
  1748  }
  1749  
  1750  message KubernetesClusterConnection {
  1751    // The name of the kubeconfig context to use.
  1752    //
  1753    // If not specified, will use the default context in the kubeconfig.
  1754    //
  1755    // +optional
  1756    optional string context = 1;
  1757  
  1758    // The default namespace to use.
  1759    //
  1760    // If not specified, will use the namespace in the kubeconfig.
  1761    //
  1762    // +optional
  1763    optional string namespace = 2;
  1764  }
  1765  
  1766  // Kubernetes-specific fields for connection status
  1767  message KubernetesClusterConnectionStatus {
  1768    // The resolved kubeconfig context.
  1769    optional string context = 2;
  1770  
  1771    // The resolved default namespace.
  1772    optional string namespace = 3;
  1773  
  1774    // The resolved cluster name (as determined by the kubeconfig context).
  1775    optional string cluster = 4;
  1776  
  1777    // The product name for this cluster.
  1778    //
  1779    // For a complete list of possible product names, see:
  1780    // https://pkg.go.dev/github.com/tilt-dev/clusterid#Product
  1781    optional string product = 1;
  1782  
  1783    // The resolved config path.
  1784    //
  1785    // Tilt will freeze the config and write it to a temporary directory.
  1786    // Subprocesses that depend on this cluster can find this file
  1787    // by reading the KUBECONFIG env var.
  1788    optional string configPath = 5;
  1789  }
  1790  
  1791  // KubernetesDiscovery
  1792  // +k8s:openapi-gen=true
  1793  // +tilt:starlark-gen=true
  1794  message KubernetesDiscovery {
  1795    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1796  
  1797    optional KubernetesDiscoverySpec spec = 2;
  1798  
  1799    optional KubernetesDiscoveryStatus status = 3;
  1800  }
  1801  
  1802  // KubernetesDiscoveryList
  1803  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  1804  message KubernetesDiscoveryList {
  1805    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  1806  
  1807    repeated KubernetesDiscovery items = 2;
  1808  }
  1809  
  1810  // KubernetesDiscoverySpec defines the desired state of KubernetesDiscovery
  1811  message KubernetesDiscoverySpec {
  1812    // Watches determine what resources are discovered.
  1813    //
  1814    // If a discovered resource (e.g. Pod) matches the KubernetesWatchRef UID exactly, it will be reported.
  1815    // If a discovered resource is transitively owned by the KubernetesWatchRef UID, it will be reported.
  1816    repeated KubernetesWatchRef watches = 1;
  1817  
  1818    // ExtraSelectors are label selectors that will force discovery of a Pod even if it does not match
  1819    // the AncestorUID.
  1820    //
  1821    // This should only be necessary in the event that a CRD creates Pods but does not set an owner reference
  1822    // to itself.
  1823    repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector extraSelectors = 2;
  1824  
  1825    // PortForwardTemplateSpec describes the data model for port forwards
  1826    // that KubernetesDiscovery should set up.
  1827    //
  1828    // The KubernetesDiscovery controller will choose a "best" candidate
  1829    // for attaching the port-forwarding. Only one PortForward will be
  1830    // active at a time.
  1831    //
  1832    // +optional
  1833    optional PortForwardTemplateSpec portForwardTemplateSpec = 3;
  1834  
  1835    // PodLogStreamTemplateSpec describes the data model for PodLogStreams
  1836    // that KubernetesDiscovery should set up.
  1837    //
  1838    // The KubernetesDiscovery controller will attach PodLogStream objects
  1839    // to all active pods it discovers.
  1840    //
  1841    // If no template is specified, the controller will stream all
  1842    // pod logs available from the apiserver.
  1843    //
  1844    // +optional
  1845    optional PodLogStreamTemplateSpec podLogStreamTemplateSpec = 4;
  1846  
  1847    // Cluster name to determine the Kubernetes cluster.
  1848    //
  1849    // If not provided, "default" will be used.
  1850    //
  1851    // +optional
  1852    optional string cluster = 5;
  1853  }
  1854  
  1855  message KubernetesDiscoveryStateRunning {
  1856    // StartTime is when Kubernetes resource discovery began.
  1857    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 1;
  1858  }
  1859  
  1860  message KubernetesDiscoveryStateWaiting {
  1861    // Reason the monitor has not yet been started.
  1862    optional string reason = 1;
  1863  }
  1864  
  1865  // KubernetesDiscoveryStatus defines the observed state of KubernetesDiscovery
  1866  message KubernetesDiscoveryStatus {
  1867    // MonitorStartTime is the timestamp of when Kubernetes resource discovery was started.
  1868    //
  1869    // It is zero if discovery has not been started yet.
  1870    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime monitorStartTime = 2;
  1871  
  1872    // Pods that have been discovered based on the criteria in the spec.
  1873    repeated Pod pods = 1;
  1874  
  1875    // Waiting contains information about why the monitor has not started.
  1876    //
  1877    // +optional
  1878    optional KubernetesDiscoveryStateWaiting waiting = 3;
  1879  
  1880    // Running contains information about the currently running monitor.
  1881    //
  1882    // +optional
  1883    optional KubernetesDiscoveryStateRunning running = 4;
  1884  }
  1885  
  1886  message KubernetesDiscoveryTemplateSpec {
  1887    // ExtraSelectors are label selectors that will force discovery of a Pod even
  1888    // if it does not match the AncestorUID.
  1889    //
  1890    // This should only be necessary in the event that a CRD creates Pods but does
  1891    // not set an owner reference to itself.
  1892    repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector extraSelectors = 1;
  1893  }
  1894  
  1895  // Finds image references in Kubernetes YAML.
  1896  message KubernetesImageLocator {
  1897    // Selects which objects to look in.
  1898    optional ObjectSelector objectSelector = 1;
  1899  
  1900    // A JSON path to the image reference field.
  1901    //
  1902    // If Object is empty, the field should be a string.
  1903    //
  1904    // If Object is non-empty, the field should be an object with subfields.
  1905    optional string path = 2;
  1906  
  1907    // A descriptor of the path and structure of an object that describes an image
  1908    // reference. This is a common way to describe images in CRDs, breaking
  1909    // them down into an object rather than an image reference string.
  1910    //
  1911    // +optional
  1912    optional KubernetesImageObjectDescriptor object = 3;
  1913  }
  1914  
  1915  message KubernetesImageObjectDescriptor {
  1916    // The name of the field that contains the image repository.
  1917    optional string repoField = 1;
  1918  
  1919    // The name of the field that contains the image tag.
  1920    optional string tagField = 2;
  1921  }
  1922  
  1923  // KubernetesWatchRef is similar to v1.ObjectReference from the Kubernetes API and is used to determine
  1924  // what objects should be reported on based on discovery.
  1925  message KubernetesWatchRef {
  1926    // UID is a Kubernetes object UID.
  1927    //
  1928    // It should either be the exact object UID or the transitive owner.
  1929    //
  1930    // +optional
  1931    optional string uid = 1;
  1932  
  1933    // Namespace is the Kubernetes namespace for discovery. Required.
  1934    optional string namespace = 2;
  1935  
  1936    // Name is the Kubernetes object name.
  1937    //
  1938    // This is not directly used in discovery; it is extra metadata.
  1939    //
  1940    // +optional
  1941    optional string name = 3;
  1942  }
  1943  
  1944  // LiveUpdate
  1945  // +k8s:openapi-gen=true
  1946  message LiveUpdate {
  1947    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  1948  
  1949    optional LiveUpdateSpec spec = 2;
  1950  
  1951    optional LiveUpdateStatus status = 3;
  1952  }
  1953  
  1954  message LiveUpdateContainerStateWaiting {
  1955    // One word camel-case reason why we're in a waiting state.
  1956    // +optional
  1957    optional string reason = 1;
  1958  
  1959    // Human-readable description of what's blocking.
  1960    // +optional
  1961    optional string message = 2;
  1962  }
  1963  
  1964  // LiveUpdateContainerStatus defines the observed state of
  1965  // the live-update syncer for a particular container.
  1966  message LiveUpdateContainerStatus {
  1967    // The name of the container in the pod.
  1968    optional string containerName = 1;
  1969  
  1970    // The ID of the container in the pod, in the format 'docker://<container_id>'.
  1971    // +optional
  1972    optional string containerID = 2;
  1973  
  1974    // The name of the pod this container belongs to.
  1975    optional string podName = 3;
  1976  
  1977    // The namespace of the pod this container belongs to.
  1978    optional string namespace = 4;
  1979  
  1980    // The timestamp of the most recent file update successfully synced to the
  1981    // container.
  1982    //
  1983    // Must match the timestamp in a FileEvent, not the time the sync was performed.
  1984    //
  1985    // +optional
  1986    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastFileTimeSynced = 5;
  1987  
  1988    // Contains any error messages from the most recent sequence of Execs.
  1989    //
  1990    // Empty if the most recent Execs completed successfully.
  1991    //
  1992    // An ExecError is not necessarily a failure state. For example, a linter
  1993    // error in the container is something we'd want to surface to the user, but
  1994    // not an indication that the live-updater did something wrong.
  1995    //
  1996    // +optional
  1997    optional string lastExecError = 6;
  1998  
  1999    // Details about a waiting live update.
  2000    //
  2001    // A live update is waiting when the reconciler is aware of file changes
  2002    // that need to be synced to the container, but has decided not to sync them yet.
  2003    optional LiveUpdateContainerStateWaiting waiting = 7;
  2004  }
  2005  
  2006  // Specifies how to select containers to live update inside Docker Compose.
  2007  message LiveUpdateDockerComposeSelector {
  2008    // The name of a DockerComposeService object.
  2009    //
  2010    // For simple projects, this is usually the same as the service
  2011    // name in the docker-compose.yml file. (But it doesn't necessarily
  2012    // have to be.)
  2013    optional string service = 1;
  2014  }
  2015  
  2016  // Runs a remote command after files have been synced to the container.
  2017  // Commonly used for small in-container changes (like moving files
  2018  // around, or restart processes).
  2019  message LiveUpdateExec {
  2020    // Command-line arguments to run inside the container. Must have length at least 1.
  2021    repeated string args = 1;
  2022  
  2023    // A list of relative paths that trigger this command exec.
  2024    //
  2025    // If not specified, all file changes seen by the LiveUpdate trigger this exec.
  2026    //
  2027    // Paths are specified relative to the the BasePath of the LiveUpdate.
  2028    //
  2029    // +optional
  2030    repeated string triggerPaths = 2;
  2031  
  2032    optional bool echoOff = 3;
  2033  }
  2034  
  2035  // Specifies how to select containers to live update inside K8s.
  2036  message LiveUpdateKubernetesSelector {
  2037    // The name of a KubernetesDiscovery object for finding pods.
  2038    optional string discoveryName = 1;
  2039  
  2040    // ApplyName is the name of a KubernetesApply object for filtering discovered pods to prevent updating old
  2041    // deployments.
  2042    //
  2043    // If not provided, no filtering will be applied and all discovered Pods will be eligible for update.
  2044    //
  2045    // +optional
  2046    optional string applyName = 3;
  2047  
  2048    // Image specifies the name of the image that we're copying files into.
  2049    //
  2050    // Determines which containers in a pod to live-update.
  2051    // Matches images by name unless tag is explicitly specified.
  2052    //
  2053    // Exactly one of Image, ContainerName, or ImageMapName MUST be specified.
  2054    //
  2055    // +optional
  2056    optional string image = 2;
  2057  
  2058    // ContainerName specifies the name of the container that we're copying files into.
  2059    //
  2060    // Exactly one of Image, ContainerName, or ImageMapName MUST be specified.
  2061    //
  2062    // +optional
  2063    optional string containerName = 4;
  2064  
  2065    // ImageMapName specifies the name of an ImageMapName object to use for determining
  2066    // the image we're copying files into.
  2067    //
  2068    // Exactly one of Image, ContainerName, or ImageMapName MUST be specified.
  2069    //
  2070    // +optional
  2071    optional string imageMapName = 5;
  2072  }
  2073  
  2074  // LiveUpdateList
  2075  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2076  message LiveUpdateList {
  2077    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2078  
  2079    repeated LiveUpdate items = 2;
  2080  }
  2081  
  2082  // Specifies how to select containers to live update.
  2083  //
  2084  // Every live update must be associated with some object for finding
  2085  // containers. In the future, we expect there to be other types
  2086  // of container discovery objects (like Docker Compose container discovery).
  2087  message LiveUpdateSelector {
  2088    // Finds containers in Kubernetes.
  2089    optional LiveUpdateKubernetesSelector kubernetes = 1;
  2090  
  2091    // Finds containers in Docker Compose.
  2092    optional LiveUpdateDockerComposeSelector dockerCompose = 2;
  2093  }
  2094  
  2095  // Specifies how to pull in files.
  2096  message LiveUpdateSource {
  2097    // The name of a FileWatch to use as a file source.
  2098    //
  2099    // +optional
  2100    optional string fileWatch = 1;
  2101  
  2102    // Name of the ImageMap object to watch for which file changes from this source
  2103    // are included in the container image.
  2104    //
  2105    // If not provided, the live-updater will copy any file changes that it's aware of,
  2106    // even if they're already included in the container.
  2107    //
  2108    // +optional
  2109    optional string imageMap = 2;
  2110  }
  2111  
  2112  // LiveUpdateSpec defines the desired state of LiveUpdate
  2113  message LiveUpdateSpec {
  2114    // An absolute local path that serves as the basis for all
  2115    // path calculations.
  2116    //
  2117    // Relative paths in this object are calculated relative to the base path. It
  2118    // cannot be empty.
  2119    //
  2120    // +tilt:local-path=true
  2121    optional string basePath = 1;
  2122  
  2123    // Specifies how this live-updater finds the containers that need live update.
  2124    optional LiveUpdateSelector selector = 8;
  2125  
  2126    // Sources of files to sync.
  2127    //
  2128    // Every live update must be associated with at least one Source object
  2129    // to trigger the update. Usually, Tilt structures it so that there's
  2130    // a Source for each image we depend on.
  2131    repeated LiveUpdateSource sources = 9;
  2132  
  2133    // A list of relative paths that will immediately stop the live-update for the
  2134    // current container.
  2135    //
  2136    // Used to detect file changes that invalidate the entire container image,
  2137    // forcing a complete rebuild.
  2138    //
  2139    // +optional
  2140    repeated string stopPaths = 4;
  2141  
  2142    // Specify paths that can be live-updated into the container and their destinations.
  2143    // Any file changes observed that do not match any of these will invalidate the container image and force a complete rebuild.
  2144    //
  2145    // +optional
  2146    repeated LiveUpdateSync syncs = 5;
  2147  
  2148    // A list of commands to run inside the container after files are synced.
  2149    //
  2150    // NB: In some documentation, we call these 'runs'. 'exec' more clearly
  2151    // matches kubectl exec for remote commands.
  2152    //
  2153    // +optional
  2154    repeated LiveUpdateExec execs = 6;
  2155  
  2156    // Specifies whether Tilt should try to natively restart the container in-place
  2157    // after syncs and execs.
  2158    //
  2159    // Note that native restarts are only supported by Docker and Docker Compose
  2160    // (and NOT docker-shim or containerd, the most common Kubernetes runtimes).
  2161    //
  2162    // To restart on live-update in Kubernetes, see the guide for how
  2163    // to apply extensions to add restart behavior:
  2164    //
  2165    // https://docs.tilt.dev/live_update_reference.html
  2166    //
  2167    // +optional
  2168    optional string restart = 7;
  2169  }
  2170  
  2171  // If any of the containers are currently failing to process updates, the
  2172  // LiveUpdateStateFailed surfaces information about what's happening and what
  2173  // the live-updater is doing to fix the problem.
  2174  message LiveUpdateStateFailed {
  2175    // One word camel-case reason why we've reached a failure state.
  2176    // +optional
  2177    optional string reason = 1;
  2178  
  2179    // Human-readable description of what's wrong.
  2180    // +optional
  2181    optional string message = 2;
  2182  
  2183    // When the live-updater transitioned into a Failed state.
  2184    // +optional
  2185    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastTransitionTime = 3;
  2186  }
  2187  
  2188  // LiveUpdateStatus defines the observed state of LiveUpdate
  2189  message LiveUpdateStatus {
  2190    // A list of all containers that the live-updater is currently connected to.
  2191    // +optional
  2192    repeated LiveUpdateContainerStatus containers = 1;
  2193  
  2194    // If any of the containers are currently failing to process updates,
  2195    // the Failed state surfaces information about what's happening and what
  2196    // the live-updater is doing to fix the problem.
  2197    //
  2198    // If all containers are updating successfully, Failed will be nil.
  2199    //
  2200    // +optional
  2201    optional LiveUpdateStateFailed failed = 2;
  2202  }
  2203  
  2204  // Determines how a local path maps into a container image.
  2205  message LiveUpdateSync {
  2206    // A relative path to local files. Required.
  2207    //
  2208    // Computed relative to the live-update BasePath.
  2209    optional string localPath = 1;
  2210  
  2211    // An absolute path inside the container. Required.
  2212    optional string containerPath = 2;
  2213  }
  2214  
  2215  // Selector for any Kubernetes-style API.
  2216  message ObjectSelector {
  2217    // A regular expression apiVersion match.
  2218    // +optional
  2219    optional string apiVersionRegexp = 1;
  2220  
  2221    // A regular expression kind match.
  2222    // +optional
  2223    optional string kindRegexp = 2;
  2224  
  2225    // A regular expression name match.
  2226    // +optional
  2227    optional string nameRegexp = 3;
  2228  
  2229    // A regular expression namespace match.
  2230    // +optional
  2231    optional string namespaceRegexp = 4;
  2232  }
  2233  
  2234  // Pod is a collection of containers that can run on a host.
  2235  //
  2236  // The Tilt API representation mirrors the Kubernetes API very closely. Irrelevant data is
  2237  // not included, and some fields might be simplified.
  2238  //
  2239  // There might also be Tilt-specific status fields.
  2240  message Pod {
  2241    // UID is the unique Pod UID within the K8s cluster.
  2242    optional string uid = 14;
  2243  
  2244    // Name is the Pod name within the K8s cluster.
  2245    optional string name = 1;
  2246  
  2247    // Namespace is the Pod namespace within the K8s cluster.
  2248    optional string namespace = 2;
  2249  
  2250    // CreatedAt is when the Pod was created.
  2251    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time createdAt = 3;
  2252  
  2253    // Phase is where the Pod is at in its current lifecycle.
  2254    //
  2255    // Valid values for this are v1.PodPhase values from the Kubernetes API.
  2256    optional string phase = 4;
  2257  
  2258    // Deleting indicates that the Pod is in the process of being removed.
  2259    optional bool deleting = 5;
  2260  
  2261    // Conditions are various lifecycle conditions for this Pod.
  2262    //
  2263    // See also v1.PodCondition in the Kubernetes API.
  2264    repeated PodCondition conditions = 6;
  2265  
  2266    // InitContainers are containers executed prior to the Pod containers being executed.
  2267    repeated Container initContainers = 7;
  2268  
  2269    // Containers are the containers belonging to the Pod.
  2270    repeated Container containers = 8;
  2271  
  2272    // AncestorUID is the UID from the WatchRef that matched this Pod.
  2273    //
  2274    // If the Pod matched based on extra label selectors, this will be empty.
  2275    //
  2276    // +optional
  2277    optional string ancestorUID = 15;
  2278  
  2279    // PodTemplateSpecHash is a hash of the Pod template spec.
  2280    //
  2281    // Tilt uses this to associate Pods with the build that triggered them.
  2282    optional string podTemplateSpecHash = 10;
  2283  
  2284    // Status is a concise description for the Pod's current state.
  2285    //
  2286    // This is based off the status output from `kubectl get pod` and is not an "enum-like"
  2287    // value.
  2288    optional string status = 12;
  2289  
  2290    // Errors are aggregated error messages for the Pod and its containers.
  2291    repeated string errors = 13;
  2292  
  2293    // Direct owner of this pod, if available.
  2294    optional PodOwner owner = 16;
  2295  }
  2296  
  2297  // PodCondition is a lifecycle condition for a Pod.
  2298  message PodCondition {
  2299    // Type is the type of condition.
  2300    //
  2301    // Valid values for this are v1.PodConditionType values from the Kubernetes API.
  2302    optional string type = 1;
  2303  
  2304    // Status is the current state of the condition (True, False, or Unknown).
  2305    //
  2306    // Valid values for this are v1.PodConditionStatus values from the Kubernetes API.
  2307    optional string status = 2;
  2308  
  2309    // LastTransitionTime is the last time the status changed.
  2310    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
  2311  
  2312    // Reason is a unique, one-word, CamelCase value for the cause of the last status change.
  2313    optional string reason = 4;
  2314  
  2315    // Message is a human-readable description of the last status change.
  2316    optional string message = 5;
  2317  }
  2318  
  2319  // PodLogStream
  2320  //
  2321  // Streams logs from a pod on Kubernetes into the core Tilt engine.
  2322  //
  2323  // +k8s:openapi-gen=true
  2324  message PodLogStream {
  2325    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2326  
  2327    optional PodLogStreamSpec spec = 2;
  2328  
  2329    optional PodLogStreamStatus status = 3;
  2330  }
  2331  
  2332  // PodLogStreamList
  2333  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2334  message PodLogStreamList {
  2335    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2336  
  2337    repeated PodLogStream items = 2;
  2338  }
  2339  
  2340  // PodLogStreamSpec defines the desired state of PodLogStream
  2341  //
  2342  // Translated into a PodLog query to the current Kubernetes cluster:
  2343  // https://pkg.go.dev/k8s.io/api/core/v1#PodLogOptions
  2344  //
  2345  // TODO(nick): Should all Kubernetes types have an object that describes
  2346  // which Kubernetes context to use?
  2347  message PodLogStreamSpec {
  2348    // The name of the pod to watch. Required.
  2349    optional string pod = 1;
  2350  
  2351    // The namespace of the pod to watch. Defaults to the kubecontext default namespace.
  2352    //
  2353    // +optional
  2354    optional string namespace = 2;
  2355  
  2356    // An RFC3339 timestamp from which to show logs. If this value
  2357    // precedes the time a pod was started, only logs since the pod start will be returned.
  2358    // If this value is in the future, no logs will be returned.
  2359    //
  2360    // Translates directly to the underlying PodLogOptions.
  2361    //
  2362    // +optional
  2363    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 3;
  2364  
  2365    // The names of containers to include in the stream.
  2366    //
  2367    // If `onlyContainers` and `ignoreContainers` are not set,
  2368    // will watch all containers in the pod.
  2369    //
  2370    // +optional
  2371    repeated string onlyContainers = 4;
  2372  
  2373    // The names of containers to exclude from the stream.
  2374    //
  2375    // If `onlyContainers` and `ignoreContainers` are not set,
  2376    // will watch all containers in the pod.
  2377    //
  2378    // +optional
  2379    repeated string ignoreContainers = 5;
  2380  
  2381    // Cluster the Pod belongs to.
  2382    //
  2383    // If not provided, "default" will be used.
  2384    //
  2385    // +optional
  2386    optional string cluster = 6;
  2387  }
  2388  
  2389  // PodLogStreamStatus defines the observed state of PodLogStream
  2390  message PodLogStreamStatus {
  2391    // A list of containers being watched.
  2392    //
  2393    // +optional
  2394    repeated ContainerLogStreamStatus containerStatuses = 1;
  2395  
  2396    // Error message encountered while setting up the stream.
  2397    //
  2398    // +optional
  2399    optional string error = 2;
  2400  }
  2401  
  2402  // PodLogStreamTemplateSpec describes common attributes for PodLogStreams
  2403  // that can be shared across pods.
  2404  message PodLogStreamTemplateSpec {
  2405    // An RFC3339 timestamp from which to show logs. If this value
  2406    // precedes the time a pod was started, only logs since the pod start will be returned.
  2407    // If this value is in the future, no logs will be returned.
  2408    //
  2409    // Translates directly to the underlying PodLogOptions.
  2410    //
  2411    // +optional
  2412    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 1;
  2413  
  2414    // The names of containers to include in the stream.
  2415    //
  2416    // If `onlyContainers` and `ignoreContainers` are not set,
  2417    // will watch all containers in the pod.
  2418    //
  2419    // +optional
  2420    repeated string onlyContainers = 2;
  2421  
  2422    // The names of containers to exclude from the stream.
  2423    //
  2424    // If `onlyContainers` and `ignoreContainers` are not set,
  2425    // will watch all containers in the pod.
  2426    //
  2427    // +optional
  2428    repeated string ignoreContainers = 3;
  2429  }
  2430  
  2431  // PodOwner contains information of the direct owner of the
  2432  // pod, if available.
  2433  //
  2434  // Tools that need to select a most relevant pod or set of pods
  2435  // can use this info to group pods by owner.
  2436  message PodOwner {
  2437    // The name of the owner.
  2438    optional string name = 1;
  2439  
  2440    // API version of the owner.
  2441    optional string apiVersion = 3;
  2442  
  2443    // Kind of the owner
  2444    // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2445    optional string kind = 4;
  2446  
  2447    // The creation timestamp of the owner.
  2448    // +optional
  2449    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time creationTimestamp = 2;
  2450  }
  2451  
  2452  // PortForward
  2453  // +k8s:openapi-gen=true
  2454  message PortForward {
  2455    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2456  
  2457    optional PortForwardSpec spec = 2;
  2458  
  2459    optional PortForwardStatus status = 3;
  2460  }
  2461  
  2462  // PortForwardList
  2463  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2464  message PortForwardList {
  2465    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2466  
  2467    repeated PortForward items = 2;
  2468  }
  2469  
  2470  // PortForwardSpec defines the desired state of PortForward
  2471  message PortForwardSpec {
  2472    // The name of the pod to port forward to/from. Required.
  2473    optional string podName = 1;
  2474  
  2475    // The namespace of the pod to port forward to/from. Defaults to the kubecontext default namespace.
  2476    //
  2477    // +optional
  2478    optional string namespace = 2;
  2479  
  2480    // One or more port forwards to execute on the given pod. Required.
  2481    repeated Forward forwards = 3;
  2482  
  2483    // Cluster to forward ports from to the local machine.
  2484    //
  2485    // If not specified, the default Kubernetes cluster will be used.
  2486    //
  2487    // +optional
  2488    optional string cluster = 4;
  2489  }
  2490  
  2491  // PortForwardStatus defines the observed state of PortForward
  2492  message PortForwardStatus {
  2493    repeated ForwardStatus forwardStatuses = 2;
  2494  }
  2495  
  2496  // PortForwardTemplateSpec describes common attributes for PortForwards
  2497  // that can be shared across pods.
  2498  message PortForwardTemplateSpec {
  2499    // One or more port forwards to execute on the given pod. Required.
  2500    repeated Forward forwards = 1;
  2501  }
  2502  
  2503  // Probe describes a health check to be performed to determine whether it is
  2504  // alive or ready to receive traffic.
  2505  message Probe {
  2506    // The action taken to determine the health of a container
  2507    optional Handler handler = 1;
  2508  
  2509    // Number of seconds after the container has started before liveness probes are initiated.
  2510    // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  2511    // +optional
  2512    optional int32 initialDelaySeconds = 2;
  2513  
  2514    // Number of seconds after which the probe times out.
  2515    // Defaults to 1 second. Minimum value is 1.
  2516    // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
  2517    // +optional
  2518    optional int32 timeoutSeconds = 3;
  2519  
  2520    // How often (in seconds) to perform the probe.
  2521    // Default to 10 seconds. Minimum value is 1.
  2522    // +optional
  2523    optional int32 periodSeconds = 4;
  2524  
  2525    // Minimum consecutive successes for the probe to be considered successful after having failed.
  2526    // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
  2527    // +optional
  2528    optional int32 successThreshold = 5;
  2529  
  2530    // Minimum consecutive failures for the probe to be considered failed after having succeeded.
  2531    // Defaults to 3. Minimum value is 1.
  2532    // +optional
  2533    optional int32 failureThreshold = 6;
  2534  }
  2535  
  2536  message RegistryHosting {
  2537    // Host documents the host (hostname and port) of the registry, as seen from
  2538    // outside the cluster.
  2539    //
  2540    // This is the registry host that tools outside the cluster should push images
  2541    // to.
  2542    optional string host = 1;
  2543  
  2544    // HostFromClusterNetwork documents the host (hostname and port) of the
  2545    // registry, as seen from networking inside the container pods.
  2546    //
  2547    // This is the registry host that tools running on pods inside the cluster
  2548    // should push images to. If not set, then tools inside the cluster should
  2549    // assume the local registry is not available to them.
  2550    //
  2551    // +optional
  2552    optional string hostFromClusterNetwork = 2;
  2553  
  2554    // HostFromContainerRuntime documents the host (hostname and port) of the
  2555    // registry, as seen from the cluster's container runtime.
  2556    //
  2557    // When tools apply Kubernetes objects to the cluster, this host should be
  2558    // used for image name fields. If not set, users of this field should use the
  2559    // value of Host instead.
  2560    //
  2561    // Note that it doesn't make sense semantically to define this field, but not
  2562    // define Host or HostFromClusterNetwork. That would imply a way to pull
  2563    // images without a way to push images.
  2564    //
  2565    // +optional
  2566    optional string hostFromContainerRuntime = 3;
  2567  
  2568    // Help contains a URL pointing to documentation for users on how to set
  2569    // up and configure a local registry.
  2570    //
  2571    // Tools can use this to nudge users to enable the registry. When possible,
  2572    // the writer should use as permanent a URL as possible to prevent drift
  2573    // (e.g., a version control SHA).
  2574    //
  2575    // When image pushes to a registry host specified in one of the other fields
  2576    // fail, the tool should display this help URL to the user. The help URL
  2577    // should contain instructions on how to diagnose broken or misconfigured
  2578    // registries.
  2579    //
  2580    // +optional
  2581    optional string help = 4;
  2582  
  2583    // SingleName uses a shared image name for _all_ Tilt-built images and
  2584    // relies on tags to distinguish between logically distinct images.
  2585    //
  2586    // This is most commonly used with Amazon Elastic Container Registry (ECR),
  2587    // which works differently than other image registries.
  2588    //
  2589    // An ECR host takes the form https://aws_account_id.dkr.ecr.region.amazonaws.com.
  2590    // Each image name in that registry must be pre-created ಠ_ಠ and assigned
  2591    // IAM permissions.
  2592    // For example: https://aws_account_id.dkr.ecr.region.amazonaws.com/my-repo
  2593    // (They call this a repo).
  2594    //
  2595    // For this reason, some users using ECR prefer to push all images to a
  2596    // single image name (ECR repo).
  2597    //
  2598    // A recommended pattern here is to create a "personal" image repo for each
  2599    // user during development.
  2600    //
  2601    // See:
  2602    // https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html
  2603    // https://github.com/tilt-dev/tilt/issues/2419
  2604    //
  2605    // +optional
  2606    optional string singleName = 5;
  2607  }
  2608  
  2609  // RestartOnSpec indicates the set of objects that can trigger a restart of this object.
  2610  message RestartOnSpec {
  2611    // FileWatches that can trigger a restart.
  2612    // +optional
  2613    repeated string fileWatches = 1;
  2614  
  2615    // UIButtons that can trigger a restart.
  2616    // +optional
  2617    repeated string uiButtons = 2;
  2618  }
  2619  
  2620  // Session provides introspective data about the status of the Tilt process.
  2621  // +k8s:openapi-gen=true
  2622  message Session {
  2623    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2624  
  2625    optional SessionSpec spec = 2;
  2626  
  2627    optional SessionStatus status = 3;
  2628  }
  2629  
  2630  message SessionCISpec {
  2631    // Grace period given for Kubernetes resources to recover after
  2632    // they start failing.
  2633    //
  2634    // If omitted, and in exitCondition=ci, the session will exit as soon
  2635    // as we see a pod failure.
  2636    optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration k8sGracePeriod = 1;
  2637  
  2638    // Timeout for the whole CI pipeline. Defaults to 30m.
  2639    optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration timeout = 2;
  2640  
  2641    // Timeout for a resource to become ready before the CI pipeline fails.
  2642    // Measured from the time the resource is started.
  2643    // Defaults to 5m.
  2644    optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration readinessTimeout = 3;
  2645  }
  2646  
  2647  // SessionList is a list of Session objects.
  2648  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2649  message SessionList {
  2650    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2651  
  2652    repeated Session items = 2;
  2653  }
  2654  
  2655  // SessionSpec defines the desired state of Session
  2656  message SessionSpec {
  2657    // TiltfilePath is the path to the Tiltfile for the run. It cannot be empty.
  2658    optional string tiltfilePath = 1;
  2659  
  2660    // ExitCondition defines the criteria for Tilt to exit.
  2661    optional string exitCondition = 2;
  2662  
  2663    // Additional settings when in exitCondition=CI.
  2664    optional SessionCISpec ci = 3;
  2665  }
  2666  
  2667  // SessionStatus defines the observed state of Session
  2668  message SessionStatus {
  2669    // PID is the process identifier for this instance of Tilt.
  2670    optional int64 pid = 1;
  2671  
  2672    // StartTime is when the Tilt engine was first started.
  2673    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 2;
  2674  
  2675    // Targets are normalized representations of the servers/jobs managed by this Session.
  2676    //
  2677    // A resource from a Tiltfile might produce one or more targets. A target can also be shared across
  2678    // multiple resources (e.g. an image referenced by multiple K8s pods).
  2679    repeated Target targets = 3;
  2680  
  2681    // Done indicates whether this Session has completed its work and is ready to exit.
  2682    optional bool done = 4;
  2683  
  2684    // Error is a non-empty string when the Session is Done but encountered a failure as defined by the ExitCondition
  2685    // from the SessionSpec.
  2686    //
  2687    // +optional
  2688    optional string error = 5;
  2689  }
  2690  
  2691  // StartOnSpec indicates the set of objects that can trigger a start/restart of this object.
  2692  message StartOnSpec {
  2693    // StartAfter indicates that events before this time should be ignored.
  2694    //
  2695    // +optional
  2696    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startAfter = 1;
  2697  
  2698    // UIButtons that can trigger a start/restart.
  2699    repeated string uiButtons = 2;
  2700  }
  2701  
  2702  // Describes where a ToggleButton's state is stored.
  2703  // Exactly one type of source must be set.
  2704  message StateSource {
  2705    // State is stored in a ConfigMap.
  2706    //
  2707    // +optional
  2708    optional ConfigMapStateSource configMap = 1;
  2709  }
  2710  
  2711  message StopOnSpec {
  2712    // UIButtons that can trigger a stop.
  2713    repeated string uiButtons = 2;
  2714  }
  2715  
  2716  // TCPSocketAction describes an action based on opening a socket
  2717  message TCPSocketAction {
  2718    // Number or name of the port to access on the container.
  2719    // Number must be in the range 1 to 65535.
  2720    optional int32 port = 1;
  2721  
  2722    // Optional: Host name to connect to, defaults to the pod IP.
  2723    // +optional
  2724    optional string host = 2;
  2725  }
  2726  
  2727  // Target is a server or job whose execution is managed as part of this Session.
  2728  message Target {
  2729    // Name is the name of the target; this is auto-generated from Tiltfile resources.
  2730    optional string name = 1;
  2731  
  2732    // Type is the execution profile for this resource.
  2733    //
  2734    // Job targets run to completion (e.g. a build script or database migration script).
  2735    // Server targets run indefinitely (e.g. an HTTP server).
  2736    optional string type = 2;
  2737  
  2738    // Resources are one or more Tiltfile resources that this target is associated with.
  2739    repeated string resources = 3;
  2740  
  2741    // State provides information about the current status of the target.
  2742    optional TargetState state = 4;
  2743  }
  2744  
  2745  // TargetState describes the current execution status for a target.
  2746  //
  2747  // Either EXACTLY one of Waiting, Active, Disabled, or Terminated will be populated or NONE of them will be.
  2748  // In the event that all states are null, the target is currently inactive or disabled and should not
  2749  // be expected to execute.
  2750  message TargetState {
  2751    // Waiting being non-nil indicates that the next execution of the target has been queued but not yet started.
  2752    //
  2753    // +optional
  2754    optional TargetStateWaiting waiting = 1;
  2755  
  2756    // Active being non-nil indicates that the target is currently executing.
  2757    //
  2758    // +optional
  2759    optional TargetStateActive active = 2;
  2760  
  2761    // Terminated being non-nil indicates that the target finished execution either normally or due to failure.
  2762    //
  2763    // +optional
  2764    optional TargetStateTerminated terminated = 3;
  2765  
  2766    // Disabled being non-nil indicates that the target is disabled.
  2767    //
  2768    // +optional
  2769    optional TargetStateDisabled disabled = 4;
  2770  }
  2771  
  2772  // TargetStateActive is a target that is currently running but has not yet finished.
  2773  message TargetStateActive {
  2774    // StartTime is when execution began.
  2775    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 1;
  2776  
  2777    // Ready indicates that the target has passed readiness checks.
  2778    //
  2779    // If the target does not use or support readiness checks, this is always true.
  2780    optional bool ready = 2;
  2781  
  2782    // LastReadyTime is when the target last passed readiness checks.
  2783    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastReadyTime = 3;
  2784  }
  2785  
  2786  // TargetStateDisabled is a target that has been disabled.
  2787  message TargetStateDisabled {
  2788  }
  2789  
  2790  // TargetStateTerminated is a target that finished running, either because it completed successfully or
  2791  // encountered an error.
  2792  message TargetStateTerminated {
  2793    // StartTime is when the target began executing.
  2794    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 1;
  2795  
  2796    // FinishTime is when the target stopped executing.
  2797    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishTime = 2;
  2798  
  2799    // Error is a non-empty string if the target encountered a failure during execution that caused it to stop.
  2800    //
  2801    // For targets of type TargetTypeServer, this is always populated, as the target is expected to run indefinitely,
  2802    // and thus any termination is an error.
  2803    //
  2804    // +optional
  2805    optional string error = 3;
  2806  
  2807    // Errors may be tolerated if the target is still within a grace period set on
  2808    // the session.
  2809    optional string graceStatus = 4;
  2810  }
  2811  
  2812  // TargetStateWaiting is a target that has been enqueued for execution but has not yet started.
  2813  message TargetStateWaiting {
  2814    // WaitReason is a description for why the target is waiting and not yet active.
  2815    //
  2816    // This is NOT the "cause" or "trigger" for the target being invoked.
  2817    optional string waitReason = 1;
  2818  }
  2819  
  2820  // Information about the running tilt binary.
  2821  message TiltBuild {
  2822    // A semantic version string.
  2823    // +optional
  2824    optional string version = 1;
  2825  
  2826    // The Git digest of the commit this binary was built at.
  2827    // +optional
  2828    optional string commitSHA = 2;
  2829  
  2830    // A human-readable string representing when the binary was built.
  2831    // +optional
  2832    optional string date = 3;
  2833  
  2834    // Indicates whether this is a development build (true) or an official release (false).
  2835    // +optional
  2836    optional bool dev = 4;
  2837  }
  2838  
  2839  // Tiltfile is the main way users add services to Tilt.
  2840  //
  2841  // The Tiltfile evaluator executes the Tiltfile, then adds all the objects
  2842  // it creates as children of the Tiltfile object.
  2843  //
  2844  // +k8s:openapi-gen=true
  2845  message Tiltfile {
  2846    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2847  
  2848    optional TiltfileSpec spec = 2;
  2849  
  2850    optional TiltfileStatus status = 3;
  2851  }
  2852  
  2853  // TiltfileList
  2854  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2855  message TiltfileList {
  2856    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2857  
  2858    repeated Tiltfile items = 2;
  2859  }
  2860  
  2861  // TiltfileSpec defines the desired state of Tiltfile
  2862  message TiltfileSpec {
  2863    // The path to the Tiltfile on disk.
  2864    optional string path = 1;
  2865  
  2866    // A set of labels to apply to all objects owned by this Tiltfile.
  2867    // +optional
  2868    map<string, string> labels = 2;
  2869  
  2870    // Objects that can trigger a re-execution of this Tiltfile.
  2871    // +optional
  2872    optional RestartOnSpec restartOn = 3;
  2873  
  2874    // Arguments to the Tiltfile.
  2875    //
  2876    // Arguments can be positional (['a', 'b', 'c']) or flag-based ('--to-edit=a').
  2877    // By default, a list of arguments indicates the list of services in the tiltfile
  2878    // that should be enabled.
  2879    //
  2880    // +optional
  2881    repeated string args = 4;
  2882  
  2883    // Objects that can stop execution of this Tiltfile.
  2884    //
  2885    // +optional
  2886    optional StopOnSpec stopOn = 5;
  2887  }
  2888  
  2889  // TiltfileStateRunning is a running state of a tiltfile execution.
  2890  message TiltfileStateRunning {
  2891    // The reason why this tiltfile was built.
  2892    // May contain more than one reason.
  2893    // +optional
  2894    repeated string reasons = 1;
  2895  
  2896    // Time at which previous execution of the command started.
  2897    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 2;
  2898  }
  2899  
  2900  // TiltfileStateTerminated is a terminated state of a tiltfile execution.
  2901  message TiltfileStateTerminated {
  2902    // The reasons why this tiltfile was built.
  2903    // May contain more than one reason.
  2904    // +optional
  2905    repeated string reasons = 1;
  2906  
  2907    // Error message if this tiltfile execution failed.
  2908    // +optional
  2909    optional string error = 2;
  2910  
  2911    // Time at which previous execution of the command started.
  2912    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 3;
  2913  
  2914    // Time at which the command last terminated.
  2915    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishedAt = 4;
  2916  
  2917    // Number of warnings generated by this Tiltfile.
  2918    // (brief) reason the process is terminated
  2919    // +optional
  2920    optional int32 warningCount = 5;
  2921  }
  2922  
  2923  // TiltfileStateWaiting is a waiting state of a tiltfile execution.
  2924  message TiltfileStateWaiting {
  2925    // (brief) reason the tiltfile is waiting.
  2926    // +optional
  2927    optional string reason = 1;
  2928  }
  2929  
  2930  // TiltfileStatus defines the observed state of Tiltfile
  2931  message TiltfileStatus {
  2932    // Details about a waiting tiltfile.
  2933    // +optional
  2934    optional TiltfileStateWaiting waiting = 1;
  2935  
  2936    // Details about a running tiltfile.
  2937    // +optional
  2938    optional TiltfileStateRunning running = 2;
  2939  
  2940    // Details about a terminated tiltfile.
  2941    // +optional
  2942    optional TiltfileStateTerminated terminated = 3;
  2943  }
  2944  
  2945  // ToggleButton
  2946  // +k8s:openapi-gen=true
  2947  message ToggleButton {
  2948    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  2949  
  2950    optional ToggleButtonSpec spec = 2;
  2951  
  2952    optional ToggleButtonStatus status = 3;
  2953  }
  2954  
  2955  // ToggleButtonList
  2956  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  2957  message ToggleButtonList {
  2958    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  2959  
  2960    repeated ToggleButton items = 2;
  2961  }
  2962  
  2963  // ToggleButtonSpec defines the desired state of ToggleButton
  2964  message ToggleButtonSpec {
  2965    // Where to display the button
  2966    optional UIComponentLocation location = 1;
  2967  
  2968    // Config for the button when it is "on"
  2969    optional ToggleButtonStateSpec on = 2;
  2970  
  2971    // Config for the button when it is "off"
  2972    optional ToggleButtonStateSpec off = 3;
  2973  
  2974    // If `StateSource` does not point at a valid value, the initial button
  2975    // state will be "on" or "off" depending on this bool
  2976    optional bool defaultOn = 4;
  2977  
  2978    // Where the toggle button's state is stored
  2979    optional StateSource stateSource = 5;
  2980  }
  2981  
  2982  // Describes a state (on/off) of a ToggleButton
  2983  message ToggleButtonStateSpec {
  2984    // Text to appear on the button itself or as hover text (depending on button location).
  2985    optional string text = 2;
  2986  
  2987    // IconName is a Material Icon to appear next to button text or on the button itself (depending on button location).
  2988    //
  2989    // Valid values are icon font ligature names from the Material Icons set.
  2990    // See https://fonts.google.com/icons for the full list of available icons.
  2991    //
  2992    // If both IconSVG and IconName are specified, IconSVG will take precedence.
  2993    //
  2994    // +optional
  2995    optional string iconName = 3;
  2996  
  2997    // IconSVG is an SVG to use as the icon to appear next to button text or on the button itself (depending on button
  2998    // location).
  2999    //
  3000    // This should be an <svg> element scaled for a 24x24 viewport.
  3001    //
  3002    // If both IconSVG and IconName are specified, IconSVG will take precedence.
  3003    //
  3004    // +optional
  3005    optional string iconSVG = 4;
  3006  
  3007    // If true, clicking the button in this state requires a second click
  3008    // to confirm.
  3009    //
  3010    // +optional
  3011    optional bool requiresConfirmation = 5;
  3012  }
  3013  
  3014  // ToggleButtonStatus defines the observed state of ToggleButton
  3015  message ToggleButtonStatus {
  3016    // If healthy, empty. If non-healthy, specifies a problem the ToggleButton encountered
  3017    // +optional
  3018    optional string error = 1;
  3019  }
  3020  
  3021  // Describes a boolean checkbox input field attached to a button.
  3022  message UIBoolInputSpec {
  3023    // Whether the input is initially true or false.
  3024    // +optional
  3025    optional bool defaultValue = 1;
  3026  
  3027    // If the input's value is converted to a string, use this when the value is true.
  3028    // If unspecified, its string value will be `"true"`
  3029    // +optional
  3030    optional string trueString = 2;
  3031  
  3032    // If the input's value is converted to a string, use this when the value is false.
  3033    // If unspecified, its string value will be `"false"`
  3034    // +optional
  3035    optional string falseString = 3;
  3036  }
  3037  
  3038  message UIBoolInputStatus {
  3039    optional bool value = 1;
  3040  }
  3041  
  3042  // UIBuildRunning represents an in-progress build/update in the user interface.
  3043  message UIBuildRunning {
  3044    // The time when the build started.
  3045    // +optional
  3046    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 1;
  3047  
  3048    // The log span where the build logs are stored in the logstore.
  3049    // +optional
  3050    optional string spanID = 2;
  3051  }
  3052  
  3053  // UIBuildRunning represents a finished build/update in the user interface.
  3054  message UIBuildTerminated {
  3055    // A non-empty string if the build failed with an error.
  3056    // +optional
  3057    optional string error = 1;
  3058  
  3059    // A list of warnings encountered while running the build.
  3060    // These warnings will also be printed to the build's log.
  3061    // +optional
  3062    repeated string warnings = 2;
  3063  
  3064    // The time when the build started.
  3065    // +optional
  3066    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startTime = 3;
  3067  
  3068    // The time when the build finished.
  3069    // +optional
  3070    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime finishTime = 4;
  3071  
  3072    // The log span where the build logs are stored in the logstore.
  3073    // +optional
  3074    optional string spanID = 5;
  3075  
  3076    // A crash rebuild happens when Tilt live-updated a container, then
  3077    // the pod crashed, wiping out the live-updates. Tilt does a full
  3078    // build+deploy to reset the pod state to what's on disk.
  3079    // +optional
  3080    optional bool isCrashRebuild = 6;
  3081  }
  3082  
  3083  // UIButton
  3084  // +k8s:openapi-gen=true
  3085  // +tilt:starlark-gen=true
  3086  message UIButton {
  3087    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3088  
  3089    optional UIButtonSpec spec = 2;
  3090  
  3091    optional UIButtonStatus status = 3;
  3092  }
  3093  
  3094  // UIButtonList
  3095  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  3096  message UIButtonList {
  3097    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3098  
  3099    repeated UIButton items = 2;
  3100  }
  3101  
  3102  // UIButtonSpec defines the desired state of UIButton
  3103  message UIButtonSpec {
  3104    // Location associates the button with another component for layout.
  3105    optional UIComponentLocation location = 1;
  3106  
  3107    // Text to appear on the button itself or as hover text (depending on button location).
  3108    optional string text = 2;
  3109  
  3110    // IconName is a Material Icon to appear next to button text or on the button itself (depending on button location).
  3111    //
  3112    // Valid values are icon font ligature names from the Material Icons set.
  3113    // See https://fonts.google.com/icons for the full list of available icons.
  3114    //
  3115    // If both IconSVG and IconName are specified, IconSVG will take precedence.
  3116    //
  3117    // +optional
  3118    optional string iconName = 3;
  3119  
  3120    // IconSVG is an SVG to use as the icon to appear next to button text or on the button itself (depending on button
  3121    // location).
  3122    //
  3123    // This should be an <svg> element scaled for a 24x24 viewport.
  3124    //
  3125    // If both IconSVG and IconName are specified, IconSVG will take precedence.
  3126    //
  3127    // +optional
  3128    optional string iconSVG = 4;
  3129  
  3130    // If true, the button will be rendered, but with an effect indicating it's
  3131    // disabled. It will also be unclickable.
  3132    //
  3133    // +optional
  3134    optional bool disabled = 5;
  3135  
  3136    // If true, the UI will require the user to click the button a second time to
  3137    // confirm before taking action
  3138    //
  3139    // +optional
  3140    optional bool requiresConfirmation = 7;
  3141  
  3142    // Any inputs for this button.
  3143    // +optional
  3144    repeated UIInputSpec inputs = 6;
  3145  }
  3146  
  3147  // UIButtonStatus defines the observed state of UIButton
  3148  message UIButtonStatus {
  3149    // LastClickedAt is the timestamp of the last time the button was clicked.
  3150    //
  3151    // If the button has never clicked before, this will be the zero-value/null.
  3152    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastClickedAt = 1;
  3153  
  3154    // Status of any inputs on this button.
  3155    // +optional
  3156    repeated UIInputStatus inputs = 2;
  3157  }
  3158  
  3159  // Describes a choice dropdown input field attached to a button
  3160  message UIChoiceInputSpec {
  3161    // The list of valid values for this field
  3162    //
  3163    // +optional
  3164    repeated string choices = 2;
  3165  }
  3166  
  3167  message UIChoiceInputStatus {
  3168    optional string value = 1;
  3169  }
  3170  
  3171  // UIComponentLocation specifies where to put a UI component.
  3172  message UIComponentLocation {
  3173    // ComponentID is the identifier of the parent component to associate this component with.
  3174    //
  3175    // For example, this is a resource name if the ComponentType is Resource.
  3176    optional string componentID = 1;
  3177  
  3178    // ComponentType is the type of the parent component.
  3179    optional string componentType = 2;
  3180  }
  3181  
  3182  message UIComponentLocationResource {
  3183    optional string resourceName = 1;
  3184  }
  3185  
  3186  // Configures Tilt to enable non-default features (e.g., experimental or
  3187  // deprecated).
  3188  //
  3189  // The Tilt features controlled by this are generally in an unfinished state,
  3190  // and not yet documented.
  3191  //
  3192  // As a Tilt user, you don’t need to worry about this unless something
  3193  // else directs you to (e.g., an experimental feature doc, or a conversation
  3194  // with a Tilt contributor).
  3195  message UIFeatureFlag {
  3196    // The name of the flag.
  3197    // +optional
  3198    optional string name = 1;
  3199  
  3200    // The value of the flag.
  3201    // +optional
  3202    optional bool value = 2;
  3203  }
  3204  
  3205  // Describes a hidden input field attached to a button,
  3206  // with a value to pass on any submit.
  3207  message UIHiddenInputSpec {
  3208    optional string value = 1;
  3209  }
  3210  
  3211  message UIHiddenInputStatus {
  3212    optional string value = 1;
  3213  }
  3214  
  3215  // Defines an Input to render in the UI.
  3216  // If UIButton is analogous to an HTML <form>,
  3217  // UIInput is analogous to an HTML <input>.
  3218  message UIInputSpec {
  3219    // Name of this input. Must be unique within the UIButton.
  3220    optional string name = 1;
  3221  
  3222    // A label to display next to this input in the UI.
  3223    // +optional
  3224    optional string label = 2;
  3225  
  3226    // A Text input that takes a string.
  3227    // +optional
  3228    optional UITextInputSpec text = 3;
  3229  
  3230    // A Bool input that is true or false
  3231    // +optional
  3232    optional UIBoolInputSpec bool = 4;
  3233  
  3234    // An input that has a constant value and does not display to the user
  3235    // +optional
  3236    optional UIHiddenInputSpec hidden = 5;
  3237  
  3238    // A Choice input that takes a list of strings
  3239    optional UIChoiceInputSpec choice = 6;
  3240  }
  3241  
  3242  // The status corresponding to a UIInputSpec
  3243  message UIInputStatus {
  3244    // Name of the input whose status this is. Must match the `Name` of a corresponding
  3245    // UIInputSpec.
  3246    optional string name = 1;
  3247  
  3248    // The status of the input, if it's text
  3249    // +optional
  3250    optional UITextInputStatus text = 2;
  3251  
  3252    // The status of the input, if it's a bool
  3253    // +optional
  3254    optional UIBoolInputStatus bool = 3;
  3255  
  3256    // The status of the input, if it's a hidden
  3257    // +optional
  3258    optional UIHiddenInputStatus hidden = 4;
  3259  
  3260    // The status of the input, if it's a choice
  3261    // +optional
  3262    optional UIChoiceInputStatus choice = 5;
  3263  }
  3264  
  3265  // UIResource represents per-resource status data for rendering the web UI.
  3266  //
  3267  // Treat this as a legacy data structure that's more intended to make transition
  3268  // easier rather than a robust long-term API.
  3269  //
  3270  // +k8s:openapi-gen=true
  3271  message UIResource {
  3272    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3273  
  3274    optional UIResourceSpec spec = 2;
  3275  
  3276    optional UIResourceStatus status = 3;
  3277  }
  3278  
  3279  // UIResourceCompose contains status information specific to Docker Compose.
  3280  message UIResourceCompose {
  3281    // Status is one of Starting, Healthy or Unhealthy
  3282    optional string healthStatus = 1;
  3283  }
  3284  
  3285  message UIResourceCondition {
  3286    // Type of UI Resource condition.
  3287    optional string type = 1;
  3288  
  3289    // Status of the condition, one of True, False, Unknown.
  3290    optional string status = 6;
  3291  
  3292    // Last time the condition transitioned from one status to another.
  3293    // +optional
  3294    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastTransitionTime = 3;
  3295  
  3296    // The reason for the condition's last transition.
  3297    // +optional
  3298    optional string reason = 4;
  3299  
  3300    // A human readable message indicating details about the transition.
  3301    // +optional
  3302    optional string message = 5;
  3303  }
  3304  
  3305  // UIResourceKubernetes contains status information specific to Kubernetes.
  3306  message UIResourceKubernetes {
  3307    // The name of the active pod.
  3308    //
  3309    // The active pod tends to be what Tilt defaults to for port-forwards,
  3310    // live-updates, etc.
  3311    // +optional
  3312    optional string podName = 1;
  3313  
  3314    // The creation time of the active pod.
  3315    // +optional
  3316    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time podCreationTime = 2;
  3317  
  3318    // The last update time of the active pod
  3319    // +optional
  3320    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time podUpdateStartTime = 3;
  3321  
  3322    // The status of the active pod.
  3323    // +optional
  3324    optional string podStatus = 4;
  3325  
  3326    // Extra error messaging around the current status of the active pod.
  3327    // +optional
  3328    optional string podStatusMessage = 5;
  3329  
  3330    // Whether all the containers in the pod are currently healthy
  3331    // and have passed readiness checks.
  3332    // +optional
  3333    optional bool allContainersReady = 6;
  3334  
  3335    // The number of pod restarts.
  3336    // +optional
  3337    optional int32 podRestarts = 7;
  3338  
  3339    // The span where this pod stores its logs in the Tilt logstore.
  3340    // +optional
  3341    optional string spanID = 8;
  3342  
  3343    // The list of all resources deployed in the Kubernetes deploy
  3344    // for this resource.
  3345    // +optional
  3346    repeated string displayNames = 9;
  3347  }
  3348  
  3349  // UIResourceLink represents a link assocatiated with a UIResource.
  3350  message UIResourceLink {
  3351    // A URL to link to.
  3352    // +optional
  3353    optional string url = 1;
  3354  
  3355    // The display label on a URL.
  3356    // +optional
  3357    optional string name = 2;
  3358  }
  3359  
  3360  // UIResourceList
  3361  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  3362  message UIResourceList {
  3363    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3364  
  3365    repeated UIResource items = 2;
  3366  }
  3367  
  3368  // UIResourceLocal contains status information specific to local commands.
  3369  message UIResourceLocal {
  3370    // The PID of the actively running local command.
  3371    // +optional
  3372    optional int64 pid = 1;
  3373  
  3374    // Whether this represents a test job.
  3375    //
  3376    // Deprecated: Users should use labels for marking services as tests.
  3377    //
  3378    // +optional
  3379    optional bool isTest = 2;
  3380  }
  3381  
  3382  // UIResourceSpec is an empty struct.
  3383  // UIResource is a kludge for making Tilt's internal status readable, not
  3384  // for specifying behavior.
  3385  message UIResourceSpec {
  3386  }
  3387  
  3388  message UIResourceStateWaiting {
  3389    // Reason is a unique, one-word reason for why the UIResource update is pending.
  3390    optional string reason = 1;
  3391  
  3392    // HoldingOn is the set of objects blocking this resource from updating.
  3393    //
  3394    // These objects might NOT be explicit dependencies of the current resource. For example, if an un-parallelizable
  3395    // resource is updating, all other resources with queued updates will be holding on it with a reason of
  3396    // `waiting-for-local`.
  3397    //
  3398    // +optional
  3399    repeated UIResourceStateWaitingOnRef on = 2;
  3400  }
  3401  
  3402  message UIResourceStateWaitingOnRef {
  3403    // Group for the object type being waited on.
  3404    optional string group = 1;
  3405  
  3406    // APIVersion for the object type being waited on.
  3407    optional string apiVersion = 2;
  3408  
  3409    // Kind of the object type being waited on.
  3410    optional string kind = 3;
  3411  
  3412    // Name of the object being waiting on.
  3413    optional string name = 4;
  3414  }
  3415  
  3416  // UIResourceStatus defines the observed state of UIResource
  3417  message UIResourceStatus {
  3418    // The last time this resource was deployed.
  3419    // +optional
  3420    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastDeployTime = 1;
  3421  
  3422    // Bit mask representing whether this resource is run when:
  3423    // 1) When a file changes
  3424    // 2) When the resource initializes
  3425    // +optional
  3426    optional int32 triggerMode = 2;
  3427  
  3428    // Past completed builds.
  3429    // +optional
  3430    repeated UIBuildTerminated buildHistory = 3;
  3431  
  3432    // The currently running build, if any.
  3433    // +optional
  3434    optional UIBuildRunning currentBuild = 4;
  3435  
  3436    // When the build was put in the pending queue.
  3437    // +optional
  3438    optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime pendingBuildSince = 5;
  3439  
  3440    // True if the build was put in the pending queue due to file changes.
  3441    // +optional
  3442    optional bool hasPendingChanges = 6;
  3443  
  3444    // Links attached to this resource.
  3445    // +optional
  3446    repeated UIResourceLink endpointLinks = 7;
  3447  
  3448    // Extra data about Kubernetes resources.
  3449    // +optional
  3450    optional UIResourceKubernetes k8sResourceInfo = 8;
  3451  
  3452    // Extra data about Compose resources.
  3453    // +optional
  3454    optional UIResourceCompose composeResourceInfo = 19;
  3455  
  3456    // Extra data about Local resources
  3457    // +optional
  3458    optional UIResourceLocal localResourceInfo = 9;
  3459  
  3460    // The RuntimeStatus is a simple, high-level summary of the runtime state of a server.
  3461    //
  3462    // Not all resources run servers.
  3463    // +optional
  3464    optional string runtimeStatus = 10;
  3465  
  3466    // The UpdateStatus is a simple, high-level summary of any update tasks to bring
  3467    // the resource up-to-date.
  3468    //
  3469    // If the resource runs a server, this may include both build tasks and live-update
  3470    // syncing.
  3471    // +optional
  3472    optional string updateStatus = 14;
  3473  
  3474    // Information about all the target specs that this resource summarizes.
  3475    // +optional
  3476    repeated UIResourceTargetSpec specs = 12;
  3477  
  3478    // Queued is a simple indicator of whether the resource is queued for an update.
  3479    // +optional
  3480    optional bool queued = 13;
  3481  
  3482    // Order expresses the relative order of resources in the UI when they're not
  3483    // otherwise sorted. Lower integers go first. When two resources have the same
  3484    // order, they should be sorted by name.
  3485    //
  3486    // When UIResources are generated from the Tiltfile, we use the order they
  3487    // were added to the Tiltfile for the Order field.
  3488    //
  3489    // +optional
  3490    optional int32 order = 15;
  3491  
  3492    // Information about the resource's objects' disabled status.
  3493    optional DisableResourceStatus disableStatus = 16;
  3494  
  3495    // Waiting provides detail on why the resource is currently blocked from updating.
  3496    //
  3497    // +optional
  3498    optional UIResourceStateWaiting waiting = 17;
  3499  
  3500    // Represents the latest available observations of a UIResource's current state.
  3501    //
  3502    // Designed for compatibility with 'wait' and cross-resource status reporting.
  3503    // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
  3504    //
  3505    // +optional
  3506    repeated UIResourceCondition conditions = 18;
  3507  }
  3508  
  3509  // UIResourceTargetSpec represents the spec of a build or deploy that a resource summarizes.
  3510  message UIResourceTargetSpec {
  3511    // The ID of the target.
  3512    // +optional
  3513    optional string id = 1;
  3514  
  3515    // The type of the target.
  3516    // +optional
  3517    optional string type = 2;
  3518  
  3519    // Whether the target has a live update associated with it.
  3520    // +optional
  3521    optional bool hasLiveUpdate = 3;
  3522  }
  3523  
  3524  // UISession represents global status data for rendering the web UI.
  3525  //
  3526  // Treat this as a legacy data structure that's more intended to make transition
  3527  // easier rather than a robust long-term API.
  3528  //
  3529  // Per-resource status data should be stored in UIResource.
  3530  //
  3531  // +k8s:openapi-gen=true
  3532  message UISession {
  3533    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  3534  
  3535    optional UISessionSpec spec = 2;
  3536  
  3537    optional UISessionStatus status = 3;
  3538  }
  3539  
  3540  // UISessionList
  3541  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
  3542  message UISessionList {
  3543    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  3544  
  3545    repeated UISession items = 2;
  3546  }
  3547  
  3548  // UISessionSpec is an empty struct.
  3549  // UISession is a kludge for making Tilt's internal status readable, not
  3550  // for specifying behavior.
  3551  message UISessionSpec {
  3552  }
  3553  
  3554  // UISessionStatus defines the observed state of UISession
  3555  message UISessionStatus {
  3556    // FeatureFlags reports a list of experimental features that have been
  3557    // enabled.
  3558    // +optional
  3559    repeated UIFeatureFlag featureFlags = 1;
  3560  
  3561    // NeedsAnalyticsNudge reports whether the UI hasn't opted in or out
  3562    // of analytics, and the UI should nudge them to do so.
  3563    // +optional
  3564    optional bool needsAnalyticsNudge = 2;
  3565  
  3566    // RunningTiltBuild reports the currently running version of tilt
  3567    // that this UI is talking to.
  3568    // +optional
  3569    optional TiltBuild runningTiltBuild = 3;
  3570  
  3571    // SuggestedTiltVersion tells the UI the recommended version for this
  3572    // user. If the version is different than what's running, the UI
  3573    // may display a prompt to upgrade.
  3574    // +optional
  3575    optional string suggestedTiltVersion = 4;
  3576  
  3577    // VersionSettings indicates whether version updates have been enabled/disabled
  3578    // from the Tiltfile.
  3579    // +optional
  3580    optional VersionSettings versionSettings = 12;
  3581  
  3582    // TiltCloudUsername reports the username if the user is signed into
  3583    // TiltCloud.
  3584    //
  3585    // deprecated: no longer populated
  3586    //
  3587    // +optional
  3588    optional string tiltCloudUsername = 5;
  3589  
  3590    // TiltCloudUsername reports the human-readable team name if the user is
  3591    // signed into TiltCloud and the Tiltfile declares a team.
  3592    //
  3593    // deprecated: no longer populated
  3594    //
  3595    // +optional
  3596    optional string tiltCloudTeamName = 6;
  3597  
  3598    // TiltCloudSchemeHost reports the base URL of the Tilt Cloud instance
  3599    // associated with this Tilt process. Usually https://cloud.tilt.dev
  3600    //
  3601    // deprecated: no longer populated
  3602    //
  3603    // +optional
  3604    optional string tiltCloudSchemeHost = 7;
  3605  
  3606    // TiltCloudTeamID reports the unique team id if the user is signed into
  3607    // TiltCloud and the Tiltfile declares a team.
  3608    //
  3609    // deprecated: no longer populated
  3610    //
  3611    // +optional
  3612    optional string tiltCloudTeamID = 8;
  3613  
  3614    // A FatalError is an error that forces Tilt to stop its control loop.
  3615    // The API server will stay up and continue to serve the UI, but
  3616    // no further builds will happen.
  3617    // +optional
  3618    optional string fatalError = 9;
  3619  
  3620    // The time that this instance of tilt started.
  3621    // Clients can use this to determine if the API server has restarted
  3622    // and all the objects need to be refreshed.
  3623    // +optional
  3624    optional k8s.io.apimachinery.pkg.apis.meta.v1.Time tiltStartTime = 10;
  3625  
  3626    // An identifier for the Tiltfile that is running.
  3627    // Clients can use this to store data associated with a particular
  3628    // project in LocalStorage or other persistent storage.
  3629    // +optional
  3630    optional string tiltfileKey = 11;
  3631  }
  3632  
  3633  // Describes a text input field attached to a button.
  3634  message UITextInputSpec {
  3635    // Initial value for this field.
  3636    //
  3637    // +optional
  3638    optional string defaultValue = 1;
  3639  
  3640    // A short hint that describes the expected input of this field.
  3641    //
  3642    // +optional
  3643    optional string placeholder = 2;
  3644  }
  3645  
  3646  message UITextInputStatus {
  3647    // The content of the text input.
  3648    optional string value = 1;
  3649  }
  3650  
  3651  // Information about how the Tilt binary handles updates.
  3652  message VersionSettings {
  3653    // Whether version updates have been enabled/disabled from the Tiltfile.
  3654    // +optional
  3655    optional bool checkUpdates = 1;
  3656  }
  3657