Documentation
¶
Overview ¶
Package deploy installs a Podplane app template onto a Kubernetes cluster by rendering values and invoking Helm against a cached chart.
Index ¶
- func Logs(opts LogsOptions) error
- func Remove(opts RemoveOptions) error
- func Run(opts Options) error
- func Shell(opts ShellOptions) error
- func TemplateMirrorSetArgs(images []deps.TemplateImage, template string, cluster config.ClusterSummary, ...) []string
- type AppTargetOptions
- type Chart
- type ConfirmDebugFunc
- type ConfirmRestartFunc
- type LogsOptions
- type Options
- type RemoveOptions
- type SelectContainerFunc
- type ShellOptions
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 ¶
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
ConfirmDebugFunc asks whether to start an ephemeral debug container.
type ConfirmRestartFunc ¶ added in v0.5.8
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 ¶
RemoveOptions controls removal of a previously deployed app.
type SelectContainerFunc ¶ added in v0.5.8
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.