Documentation ¶
Index ¶
- Variables
- func ContainerDisplayNames(containers []Container) []string
- func FakeKubernetesDiscovery(image string, containers []Container) *v1alpha1.KubernetesDiscovery
- func FakeKubernetesResource(image string, containers []Container) *k8sconv.KubernetesResource
- func HandleLiveUpdateDeleteAction(state *store.EngineState, action LiveUpdateDeleteAction)
- func HandleLiveUpdateUpsertAction(state *store.EngineState, action LiveUpdateUpsertAction)
- type Container
- type LiveUpdateDeleteAction
- type LiveUpdatePlan
- type LiveUpdateUpsertAction
- type UpdateMode
- type UpdateModeFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var AllUpdateModes = []UpdateMode{ UpdateModeAuto, UpdateModeImage, UpdateModeContainer, UpdateModeKubectlExec, }
Functions ¶
func ContainerDisplayNames ¶ added in v0.23.0
func FakeKubernetesDiscovery ¶
func FakeKubernetesDiscovery(image string, containers []Container) *v1alpha1.KubernetesDiscovery
Given the set of containers we want, create a fake KubernetesDiscovery with those containers running.
func FakeKubernetesResource ¶
func FakeKubernetesResource(image string, containers []Container) *k8sconv.KubernetesResource
func HandleLiveUpdateDeleteAction ¶ added in v0.22.14
func HandleLiveUpdateDeleteAction(state *store.EngineState, action LiveUpdateDeleteAction)
func HandleLiveUpdateUpsertAction ¶ added in v0.22.14
func HandleLiveUpdateUpsertAction(state *store.EngineState, action LiveUpdateUpsertAction)
Types ¶
type Container ¶
type Container struct { PodID k8s.PodID ContainerID container.ID ContainerName container.Name Namespace k8s.Namespace }
Information describing a single running & ready container
func RunningContainersForDC ¶
func RunningContainersForDC(dcs *v1alpha1.DockerComposeService) []Container
func RunningContainersForOnePod ¶
func RunningContainersForOnePod( selector *v1alpha1.LiveUpdateKubernetesSelector, resource *k8sconv.KubernetesResource, imageMap *v1alpha1.ImageMap, ) ([]Container, error)
If all containers running the given image are ready, returns info for them. (If this image is running on multiple pods, return an error.)
func (Container) DisplayName ¶ added in v0.23.0
type LiveUpdateDeleteAction ¶ added in v0.22.14
type LiveUpdateDeleteAction struct {
Name string
}
func NewLiveUpdateDeleteAction ¶ added in v0.22.14
func NewLiveUpdateDeleteAction(n string) LiveUpdateDeleteAction
func (LiveUpdateDeleteAction) Action ¶ added in v0.22.14
func (LiveUpdateDeleteAction) Action()
type LiveUpdatePlan ¶ added in v0.22.14
type LiveUpdatePlan struct { // SyncPaths are changed (local) paths and their corresponding container paths to be synced. SyncPaths []build.PathMapping // NoMatchPaths are changed (local) paths that do not match any Live Update rules. NoMatchPaths []string // StopPaths are changed (local) paths that should halt Live Update and result in a full rebuild. // // These are often referred to as "fallback" paths, particularly in the Tiltfile API. StopPaths []string }
LiveUpdatePlan is the result of evaluating a list of changed files against the rules in the spec.
TODO(milas): we should probably canonicalize all the local paths here using .spec.basePath
func NewLiveUpdatePlan ¶ added in v0.22.14
func NewLiveUpdatePlan(luSpec v1alpha1.LiveUpdateSpec, filesChanged []string) (LiveUpdatePlan, error)
NewLiveUpdatePlan evaluates a set of changed files against a LiveUpdateSpec.
type LiveUpdateUpsertAction ¶ added in v0.22.14
type LiveUpdateUpsertAction struct {
LiveUpdate *v1alpha1.LiveUpdate
}
func NewLiveUpdateUpsertAction ¶ added in v0.22.14
func NewLiveUpdateUpsertAction(obj *v1alpha1.LiveUpdate) LiveUpdateUpsertAction
func (LiveUpdateUpsertAction) Action ¶ added in v0.22.14
func (LiveUpdateUpsertAction) Action()
type UpdateMode ¶
type UpdateMode string
var ( // Auto-pick the build mode based on UpdateModeAuto UpdateMode = "auto" // Only do image builds UpdateModeImage UpdateMode = "image" // Update containers in-place. This mode only works with DockerForDesktop and Minikube. // If you try to use this mode with a different K8s cluster type, we will return an error UpdateModeContainer UpdateMode = "container" // Use `kubectl exec` UpdateModeKubectlExec UpdateMode = "exec" )
func ProvideUpdateMode ¶
func ProvideUpdateMode(flag UpdateModeFlag, kubeContext k8s.KubeContext, env docker.ClusterEnv) (UpdateMode, error)
type UpdateModeFlag ¶
type UpdateModeFlag UpdateMode
A type to bind to flag values that need validation.
Click to show internal directories.
Click to hide internal directories.