deploy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package deploy implements the deployah deploy command.

The command renders a Deployah spec into a Helm chart and installs or upgrades the release on the target cluster for the chosen environment. A dry-run mode renders templates without mutating the cluster.

Register the command with Register on a nabat.dev/nabat.App instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(app *nabat.App)

Register adds the deploy command to app.

Types

type ComponentStatus added in v0.3.0

type ComponentStatus struct {
	// Name is the component name from the Deployah spec.
	Name string
	// ReadyPods is the number of pods that passed readiness checks.
	ReadyPods int
	// TotalPods is the total number of pods for this component.
	TotalPods int
}

ComponentStatus summarizes pod readiness for one Deployah component at the end of a deploy.

type DeployWatcher added in v0.3.0

type DeployWatcher struct {
	// contains filtered or unexported fields
}

DeployWatcher observes Kubernetes events and pod readiness during a Helm deploy. It feeds a live status view to a nabat.Status and collects warning events for post-deploy reporting.

Create with NewDeployWatcher, start with DeployWatcher.Run, then read results with DeployWatcher.Warnings and DeployWatcher.Summary after Run returns.

DeployWatcher is not safe for concurrent use. Call Run from exactly one goroutine; call Warnings and Summary only after Run returns.

func NewDeployWatcher added in v0.3.0

func NewDeployWatcher(
	k8sClient kubernetes.Interface,
	namespace, releaseName string,
) *DeployWatcher

NewDeployWatcher creates a watcher for the given release.

func (*DeployWatcher) Run added in v0.3.0

func (w *DeployWatcher) Run(ctx context.Context, st *nabat.Status)

Run watches events and polls pod status until ctx is canceled. It updates st with keyed status rows on each change. Run blocks until ctx is canceled and is intended to be called in a dedicated goroutine.

func (*DeployWatcher) Summary added in v0.3.0

func (w *DeployWatcher) Summary() []ComponentStatus

Summary returns per-component pod readiness from the last poll. Call only after DeployWatcher.Run returns.

func (*DeployWatcher) Warnings added in v0.3.0

func (w *DeployWatcher) Warnings() []k8s.DeployEvent

Warnings returns the Warning-type events collected during the deploy. Call only after DeployWatcher.Run returns.

type Options

type Options struct {
	Environment string `nabat:"environment"`
	DryRun      bool   `nabat:"dry-run"`
}

Options holds command-line flags for deploy.

Jump to

Keyboard shortcuts

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