flight

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 11 Imported by: 30

Documentation

Index

Constants

View Source
const (
	AnnotationOverrideFlight = "overrides.yoke.cd/flight"
	AnnotationOverrideMode   = "overrides.yoke.cd/mode"
)

Variables

This section is empty.

Functions

func JSONEncodeWithError added in v0.19.8

func JSONEncodeWithError(out io.Writer, value any, err error) error

JSONEncodeWithError is a utility for writing some value to stdout but returning a previously existing error as a default return. This makes call sites for returning parent/identity resource updates with errors more ergonomic. If an error occurs writing the value to stdout it will be joined with the provided error.

func Namespace

func Namespace() string

Namespace is a convenience function for fetching the namespace within the context of an executing flight. This will generally be the -namespace flag passed to "yoke takeoff"

func Release

func Release() string

Release is a convenience function for fetching the release name within the context of an executing flight.

For standalone Flights, this will be the name of the release passed to "yoke takeoff". For ATC Airflows, this will be the group.Kind.namespace.name of the Custom Resource. For YokeCD this will be the name of the corresponding Application.

Note: When using Release in resource names or similar contexts, consider sanitizing the output first.

func YokeVersion added in v0.13.4

func YokeVersion() string

YokeVersion returns the version of the yoke CLI or SDK used to run the flight.

Types

type Conditions added in v0.13.0

type Conditions []metav1.Condition

func (Conditions) OpenAPISchema added in v0.13.0

func (conditions Conditions) OpenAPISchema() *apiextensionsv1.JSONSchemaProps

type Resource added in v0.9.2

type Resource interface {
	metav1.Object
	GroupVersionKind() schema.GroupVersionKind
}

Resource is a best effort attempt at capturing the set of types that are kubernetes resources. K8s resource embed the metav1.TypeMeta struct and thus expose this method; unstructured.Unstructured objects also expose it.

Having this type allows us to not fallback to using `any` when building our flight implementations.

type Resources added in v0.11.0

type Resources []Resource

Resources represents a single deployment stage. A stage is a valid flight output. Nil resource elements are ignored when marshalling.

func (Resources) MarshalJSON added in v0.11.0

func (resources Resources) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshalling for flight stages. It allows stages to have resources written as nil instead of omitting them entirely. To support this convenience, a stage filters out nil values before serializing its content.

type Stages added in v0.9.2

type Stages []Resources

Stages is an ordered list of stages. Yoke will apply each stage one by one. Stages is a valid flight output.

type Status added in v0.6.6

type Status struct {
	// Conditions are the conditions that are met for this flight. Only the Ready condition is set by yoke
	// but you may set your own conditions.
	Conditions Conditions `json:"conditions,omitempty"`
}

Status is a basic status representation used for Flights by the ATC as well as for Airways.

Directories

Path Synopsis
Package wasi exports essentials from the wasm client-side for working with wasm from the host.
Package wasi exports essentials from the wasm client-side for working with wasm from the host.
k8s

Jump to

Keyboard shortcuts

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