yoke

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalFlight

func EvalFlight(ctx context.Context, client *k8s.Client, release string, flight FlightParams) ([]byte, []byte, error)

func ExportToFS

func ExportToFS(dir, release string, resources []*unstructured.Unstructured) error

func ExportToStdout

func ExportToStdout(ctx context.Context, resources []*unstructured.Unstructured) error

func LoadWasm

func LoadWasm(ctx context.Context, path string) (wasm []byte, err error)

Types

type Commander

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

func FromK8Client

func FromK8Client(client *k8s.Client) *Commander

func FromKubeConfig

func FromKubeConfig(path string) (*Commander, error)

func (Commander) Descent

func (commander Commander) Descent(ctx context.Context, params DescentParams) error

func (Commander) Mayday

func (client Commander) Mayday(ctx context.Context, name, ns string) error

func (Commander) Takeoff

func (commander Commander) Takeoff(ctx context.Context, params TakeoffParams) error

func (Commander) Turbulence

func (commander Commander) Turbulence(ctx context.Context, params TurbulenceParams) error

type DescentParams

type DescentParams struct {
	Release    string
	RevisionID int
	Namespace  string
	Wait       time.Duration
	Poll       time.Duration
}

type FlightParams

type FlightParams struct {
	Path                string
	Module              *wasi.Module
	Input               io.Reader
	Args                []string
	Namespace           string
	CompilationCacheDir string
}

type TakeoffParams

type TakeoffParams struct {
	// Directly send the result of evaluating the flight to stdout instead of applying it.
	SendToStdout bool

	// Skips running apply in dry-run before applying resources. Not recommended unless you know what you are doing and have specific reason to do so.
	// May be removed in a future release.
	SkipDryRun bool

	// DryRun will send the patch apply requests to the k8s api server in dry-run mode only.
	// Will not apply any state changes, nor create a revision to the release history.
	DryRun bool

	// ForceConflicts applies the path request with force. It will take ownership of fields owned by other fieldManagers.
	ForceConflicts bool

	// CrossNamespace allows for a release to create resources in a namespace other than the release's own namespace.
	CrossNamespace bool

	// Name of release
	Release string

	// Out is a folder to which to write all the resources hierarchically. This does not create a release or apply any state to the cluster.
	// This is useful for debugging/inspecting output or for working CDK8s style using kubectl apply --recursive.
	Out string

	// Parameters for the flight.
	Flight FlightParams

	// Do not apply the release but diff it against the current active version.
	DiffOnly bool

	// How many lines of context in the diff. Has no effect if DiffOnly is false.
	Context int

	// Output diffs with ansi colors.
	Color bool

	// Create namespace of target release if not exists.
	CreateNamespace bool

	// Wait interval for resources to become ready after being applied. The same wait interval is used as a timeout for each stage in a release.
	// Therefore if a stage contains a long-running job or workload it is important to set the wait time to a sufficiently long duration.
	Wait time.Duration

	// Poll interval to check for resource readiness.
	Poll time.Duration

	// OwnerReferences to be added to each resource found in release.
	OwnerReferences []metav1.OwnerReference

	// ClusterAccess grants the flight access to the kubernetes cluster. Users will be able to use the host k8s_lookup function.
	ClusterAccess bool
}

type TurbulenceParams

type TurbulenceParams struct {
	Namespace     string
	Release       string
	Context       int
	ConflictsOnly bool
	Fix           bool
	Color         bool
	Silent        bool
}

Jump to

Keyboard shortcuts

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