werf

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package werf is the backend that installs through Nelm, the deployment engine of werf: the operator prepares charts as for the helm backend and runs nelm for each component. Nelm keeps Helm-compatible release history, so this backend can roll back. The nelm binary ships in the operator image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// Run runs the nelm binary; NewBackend sets it.
	Run Runner
	// Kubeconfig is the file nelm talks to the cluster with.
	Kubeconfig string
	// TempDir receives values files.
	TempDir string
	// Secrets reads the platform values Secret.
	Secrets kubernetes.Interface
	// HistoryLimit bounds stored release revisions; it must exceed the
	// PackageRevision history, or rollbacks would target pruned releases.
	HistoryLimit int
}

Backend runs nelm.

func NewBackend

func NewBackend(binary, tempDir string, cfg *rest.Config, secrets kubernetes.Interface) (*Backend, error)

NewBackend writes a kubeconfig for nelm from cfg, so it acts with the operator's own identity, and runs binary.

func (*Backend) Apply

func (b *Backend) Apply(ctx context.Context, c backend.Component) (backend.State, error)

Apply installs or upgrades the release with nelm and waits for it.

func (*Backend) Name

func (b *Backend) Name() string

Name implements backend.Backend.

func (*Backend) Rollback

func (b *Backend) Rollback(ctx context.Context, c backend.Component, toRevision int) (backend.State, error)

Rollback re-deploys an earlier release revision.

func (*Backend) Status

func (b *Backend) Status(ctx context.Context, c backend.Component) (backend.State, error)

Status reads the release with nelm release get.

func (*Backend) Uninstall

func (b *Backend) Uninstall(ctx context.Context, c backend.Component) error

Uninstall removes the release; a release that is gone is fine.

type Runner

type Runner func(ctx context.Context, args ...string) ([]byte, error)

Runner runs nelm with arguments and returns its combined output.

Jump to

Keyboard shortcuts

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