gRPC API

This is a generated reference for the Skaffold API gRPC layer.

We also generate the reference doc for the HTTP layer.

skaffold.proto

You can find the source for skaffold.proto on Github.

Services

SkaffoldService

Describes all the methods for the Skaffold API

Method Name Request Type Response Type Description
GetState .google.protobuf.Empty State Returns the state of the current Skaffold execution
EventLog LogEntry stream LogEntry stream DEPRECATED. Events should be used instead. TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168)
Events .google.protobuf.Empty LogEntry stream Returns all the events of the current Skaffold execution from the start
Execute UserIntentRequest .google.protobuf.Empty Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled.
Handle Event .google.protobuf.Empty EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example.

Data types

BuildEvent

BuildEvent describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not. If the build fails, an error will be attached to the event.

Field Type Label Description
artifact string artifact name
status string artifact build status oneof: InProgress, Completed, Failed
err string error when build status is Failed.

BuildState

BuildState maps Skaffold artifacts to their current build states

Field Type Label Description
artifacts BuildState.ArtifactsEntry repeated A map of artifact name -> build-state. Artifact name is defined in the skaffold.yaml. The build-state can be:
- "Not started": not yet started
- "In progress": build started
- "Complete": build succeeded
- "Failed": build failed

BuildState.ArtifactsEntry

Field Type Label Description
key string
value string

DeployEvent

DeployEvent represents the status of a deployment, and is emitted by Skaffold anytime a deployment starts or completes, successfully or not.

Field Type Label Description
status string deployment status oneof: InProgress, Completed, Failed
err string error when status is Failed

DeployState

DeployState describes the status of the current deploy

Field Type Label Description
status string

Event

Event describes an event in the Skaffold process. It is one of MetaEvent, BuildEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent or FileSyncEvent.

Field Type Label Description
metaEvent MetaEvent contains general information regarding Skaffold like version info
buildEvent BuildEvent describes if the build status per artifact. Status could be one of “InProgress”, “Completed” or “Failed”.
deployEvent DeployEvent describes if the deployment has started, is in progress or is complete.
portEvent PortEvent describes each port forwarding event.
statusCheckEvent StatusCheckEvent describes if the Status check has started, is in progress, has succeeded or failed.
resourceStatusCheckEvent ResourceStatusCheckEvent indicates progress for each kubernetes deployment.
fileSyncEvent FileSyncEvent describes the sync status.

FileSyncEvent

FileSyncEvent describes the sync status.

Field Type Label Description
fileCount int32 number of files synced
image string the container image to which files are sycned.
status string status of file sync. one of: Not Started, In progress, Succeeded, Failed.
err string error in case of status failed.

FileSyncState

FileSyncState contains the status of the current file sync

Field Type Label Description
status string

Intent

Intent represents user intents for a given phase to be unblocked, once.

Field Type Label Description
build bool in case skaffold dev is ran with autoBuild=false, a build intent enables building once
sync bool in case skaffold dev is ran with autoSync=false, a sync intent enables file sync once
deploy bool in case skaffold dev is ran with autoDeploy=false, a deploy intent enables deploys once

LogEntry

LogEntry describes an event and a string description of the event.

Field Type Label Description
timestamp google.protobuf.Timestamp timestamp of the event.
event Event the actual event that is one of
entry string description of the event.

MetaEvent

MetaEvent provides general information regarding Skaffold

Field Type Label Description
entry string entry, for example: "Starting Skaffold: {Version:v0.39.0-16-g5bb7c9e0 ConfigVersion:skaffold/v1 GitVersion: GitCommit:5bb7c9e078e4d522a5ffc42a2f1274fd17d75902 GitTreeState:dirty BuildDate01:29Z GoVersion:go1.13rc1 Compiler:gc Platform:linux/amd64}"

PortEvent

PortEvent Event describes each port forwarding event.

Field Type Label Description
localPort int32 local port for forwarded resource
remotePort int32 remote port is the resource port that will be forwarded.
podName string pod name if port forwarded resourceType is Pod
containerName string container name if specified in the kubernetes spec
namespace string the namespace of the resource to port forward.
portName string
resourceType string resource type e.g. “pod”, “service”.
resourceName string name of the resource to forward.

Request

Field Type Label Description
name string

ResourceStatusCheckEvent

A Resource StatusCheck Event, indicates progress for each kubernetes deployment. For every resource, there will be exactly one event with status Succeeded or Failed event. There can be multiple events with status Pending. Skaffold polls for resource status every 0.5 second. If the resource status changes, an event with status “Pending”, “Complete” and “Failed” will be sent with the new status.

Field Type Label Description
resource string
status string
message string
err string

Response

Field Type Label Description
msg string

State

State represents the current state of the Skaffold components

Field Type Label Description
buildState BuildState
deployState DeployState
forwardedPorts State.ForwardedPortsEntry repeated
statusCheckState StatusCheckState
fileSyncState FileSyncState

State.ForwardedPortsEntry

Field Type Label Description
key int32
value PortEvent

StateResponse

Field Type Label Description
state State

StatusCheckEvent

StatusCheckEvent describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed.

Field Type Label Description
status string
message string
err string

StatusCheckState

StatusCheckState describes the state of status check of current deployed resources.

Field Type Label Description
status string
resources StatusCheckState.ResourcesEntry repeated A map of resource name -> status-check-state. Where resource-name is the kubernetes resource name. The status-check-state can be
- "Not started": indicates that status-check has just started.
- "In progress": InProgress is sent after every resource check is complete.
- "Succeeded": - "Failed":

StatusCheckState.ResourcesEntry

Field Type Label Description
key string
value string

UserIntentRequest

Field Type Label Description
intent Intent