deploy

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package deploy installs a Podplane app template onto a Kubernetes cluster by rendering values and invoking Helm against a cached chart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logs

func Logs(opts LogsOptions) error

Logs invokes `kubectl logs --follow` for pods belonging to the named app.

func Remove

func Remove(opts RemoveOptions) error

Remove invokes `helm uninstall` for the named release.

func Run

func Run(opts Options) error

Run renders Helm values from opts and invokes `helm upgrade --install` for the resolved chart. The caller is responsible for ensuring opts.ChartPath exists (typically via EnsureChart).

func Shell added in v0.5.8

func Shell(opts ShellOptions) error

Shell opens an app shell or runs one command in the selected app container.

func TemplateMirrorSetArgs added in v0.4.0

func TemplateMirrorSetArgs(images []deps.TemplateImage, template string, cluster config.ClusterSummary, explicitAppImage string, userSet []string) []string

TemplateMirrorSetArgs builds Helm --set overrides for template image defaults that should be served from the cluster's registry mirror.

Types

type AppTargetOptions added in v0.5.8

type AppTargetOptions struct {
	Name            string
	Namespace       string
	Context         string
	Kubeconfig      string
	Container       string
	SelectContainer SelectContainerFunc
}

AppTargetOptions identifies a deployed app in Kubernetes.

type Chart

type Chart struct {
	Path     string
	Template deps.TemplateChart
	Images   []deps.TemplateImage
}

Chart is a resolved template chart in the local dependency cache.

func EnsureChart

func EnsureChart(c *config.Config, template string, wrap func(download func(progress func(deps.DownloadEvent)) error) error) (Chart, error)

EnsureChart returns the local Helm chart path for template, downloading dependencies first when the chart is missing from the cache. wrap, if non-nil, brackets the download call so callers can render a UI around it; it receives the download function to invoke with a progress callback.

type ConfirmDebugFunc added in v0.5.8

type ConfirmDebugFunc func(message string) (bool, error)

ConfirmDebugFunc asks whether to start an ephemeral debug container.

type ConfirmRestartFunc added in v0.5.8

type ConfirmRestartFunc func(message string) (bool, error)

ConfirmRestartFunc asks whether to restart an app workload.

type LogsOptions

type LogsOptions struct {
	Name            string
	Namespace       string
	Context         string
	Kubeconfig      string
	Container       string
	AllContainers   bool
	SelectContainer SelectContainerFunc
}

LogsOptions controls log streaming for a deployed app.

type Options

type Options struct {
	Template         string
	Name             string
	ChartPath        string
	Image            string
	Env              []string
	Hostname         string
	Path             string
	Port             int
	RuntimeDirectory string
	Set              []string
	Namespace        string
	Context          string
	Kubeconfig       string
	Wait             bool
	Timeout          time.Duration
}

Options controls a single app deployment.

type RemoveOptions

type RemoveOptions struct {
	Name       string
	Namespace  string
	Context    string
	Kubeconfig string
}

RemoveOptions controls removal of a previously deployed app.

type SelectContainerFunc added in v0.5.8

type SelectContainerFunc func(containers []string) (container string, ok bool, err error)

SelectContainerFunc asks the user to choose one of the available containers.

type ShellOptions added in v0.5.8

type ShellOptions struct {
	Name            string
	Namespace       string
	Context         string
	Kubeconfig      string
	Container       string
	Command         []string
	SelectContainer SelectContainerFunc
	ShellPrompt     bool
	NoDebug         bool
	DebugImage      string
	ConfirmDebug    ConfirmDebugFunc
	ConfirmRestart  ConfirmRestartFunc
	Stdin           io.Reader
	Stdout          io.Writer
	Stderr          io.Writer
}

ShellOptions controls shell access for a deployed app.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL