v1alpha1

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains meta types used to invoke Composition Functions. +kubebuilder:object:generate=true +groupName=fn.apiextensions.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	Group   = "fn.apiextensions.crossplane.io"
	Version = "v1alpha1"
)

Function type metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds all registered types to scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	FunctionIOKind             = reflect.TypeOf(FunctionIO{}).Name()
	FunctionIOGroupKind        = schema.GroupKind{Group: Group, Kind: FunctionIOKind}.String()
	FunctionIOKindAPIVersion   = FunctionIOKind + "." + SchemeGroupVersion.String()
	FunctionIOGroupVersionKind = SchemeGroupVersion.WithKind(FunctionIOKind)
)

ResourceList type metadata.

Functions

This section is empty.

Types

type ConnectionDetailType

type ConnectionDetailType string

A ConnectionDetailType is a type of connection detail.

const (
	ConnectionDetailTypeUnknown                 ConnectionDetailType = "Unknown"
	ConnectionDetailTypeFromConnectionSecretKey ConnectionDetailType = "FromConnectionSecretKey"
	ConnectionDetailTypeFromFieldPath           ConnectionDetailType = "FromFieldPath"
	ConnectionDetailTypeFromValue               ConnectionDetailType = "FromValue"
)

ConnectionDetailType types.

type DerivedConnectionDetail

type DerivedConnectionDetail struct {
	// Name of the connection detail that will be propagated to the
	// connection secret of the XR. Can be omitted for FromConnectionDetailKey,
	// in which case it will default to that key.
	// +optional
	Name *string `json:"name,omitempty"`

	// Type sets the connection detail fetching behaviour to be used. Each
	// connection detail type may require its own fields to be set on the
	// ConnectionDetail object.
	// +kubebuilder:validation:Enum=FromConnectionDetailKey;FromFieldPath;FromValue
	Type ConnectionDetailType `json:"type"`

	// FromConnectionDetailKey sets an XR connection detail to the value of the
	// supplied connection detail of the composed resource.
	// +optional
	FromConnectionSecretKey *string `json:"fromConnectionSecretKey,omitempty"`

	// FromFieldPath sets an XR connection detail to the value at the supplied
	// fieldpath within the composed resource.
	// +optional
	FromFieldPath *string `json:"fromFieldPath,omitempty"`

	// Value that will be propagated to the connection detail of the XR.
	// +optional
	Value *string `json:"value,omitempty"`
}

A DerivedConnectionDetail specifies how to derive an XR connection detail from a composed resource.

func (*DerivedConnectionDetail) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DerivedConnectionDetail.

func (*DerivedConnectionDetail) DeepCopyInto

func (in *DerivedConnectionDetail) DeepCopyInto(out *DerivedConnectionDetail)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Desired

type Desired struct {
	// Composite reflects the desired state of the XR this function reconciles.
	Composite DesiredComposite `json:"composite"`

	// Resources reflect the desired state of composed resources, including
	// those that do not yet exist.
	// +optional
	Resources []DesiredResource `json:"resources,omitempty"`
}

Desired state of a function pipeline invocation.

func (*Desired) DeepCopy

func (in *Desired) DeepCopy() *Desired

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Desired.

func (*Desired) DeepCopyInto

func (in *Desired) DeepCopyInto(out *Desired)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DesiredComposite

type DesiredComposite struct {
	// Resource reflects the desired XR. Functions may update the metadata,
	// spec, and status of an XR.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Resource runtime.RawExtension `json:"resource"`

	// ConnectionDetails reflects the desired connection details of the XR.
	// +optional
	ConnectionDetails []ExplicitConnectionDetail `json:"connectionDetails"`
}

A DesiredComposite resource.

func (*DesiredComposite) DeepCopy

func (in *DesiredComposite) DeepCopy() *DesiredComposite

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DesiredComposite.

func (*DesiredComposite) DeepCopyInto

func (in *DesiredComposite) DeepCopyInto(out *DesiredComposite)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DesiredReadinessCheck

type DesiredReadinessCheck struct {
	// Type indicates the type of probe you'd like to use.
	// +kubebuilder:validation:Enum="MatchString";"MatchInteger";"NonEmpty";"MatchCondition";"None"
	Type ReadinessCheckType `json:"type"`

	// FieldPath shows the path of the field whose value will be used.
	// +optional
	FieldPath *string `json:"fieldPath,omitempty"`

	// MatchString is the value you'd like to match if you're using
	// "MatchString" type.
	// +optional
	MatchString *string `json:"matchString,omitempty"`

	// MatchInt is the value you'd like to match if you're using "MatchInt"
	// type.
	// +optional
	MatchInteger *int64 `json:"matchInteger,omitempty"`

	// MatchCondition specifies the condition you'd like to match if you're using "MatchCondition" type.
	// +optional
	MatchCondition *MatchConditionReadinessCheck `json:"matchCondition,omitempty"`
}

A DesiredReadinessCheck is used to indicate how to tell whether a resource is ready for consumption

func (*DesiredReadinessCheck) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DesiredReadinessCheck.

func (*DesiredReadinessCheck) DeepCopyInto

func (in *DesiredReadinessCheck) DeepCopyInto(out *DesiredReadinessCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DesiredResource

type DesiredResource struct {
	// Name of the desired resource. Must be unique within the array of
	// desired resources. Corresponds to the name entry in a Composition's
	// resources array, and the name entry in the observed resources array.
	Name string `json:"name"`

	// Resource reflects the desired composed resource. Functions may update the
	// metadata and spec of a composed resource. Updates to status will be
	// discarded.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Resource runtime.RawExtension `json:"resource"`

	// ConnectionDetails reflects _XR_ connection details that should be derived
	// from this composed resource.
	// +optional
	ConnectionDetails []DerivedConnectionDetail `json:"connectionDetails,omitempty"`

	// ReadinessChecks configures how this composed resource will be determined
	// to be ready.
	// +optional
	ReadinessChecks []DesiredReadinessCheck `json:"readinessChecks,omitempty"`
}

A DesiredResource represents a desired composed resource.

func (*DesiredResource) DeepCopy

func (in *DesiredResource) DeepCopy() *DesiredResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DesiredResource.

func (*DesiredResource) DeepCopyInto

func (in *DesiredResource) DeepCopyInto(out *DesiredResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExplicitConnectionDetail

type ExplicitConnectionDetail struct {
	// Name of the connection detail.
	Name string `json:"name"`

	// Value of the connection detail.
	Value string `json:"value"`
}

An ExplicitConnectionDetail is a simple map of name (key) to value.

func (*ExplicitConnectionDetail) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExplicitConnectionDetail.

func (*ExplicitConnectionDetail) DeepCopyInto

func (in *ExplicitConnectionDetail) DeepCopyInto(out *ExplicitConnectionDetail)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FunctionIO

type FunctionIO struct {
	metav1.TypeMeta `json:",inline"`

	// Config is an opaque Kubernetes object containing optional function
	// configuration.
	// +optional
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Config *runtime.RawExtension `json:"config,omitempty"`

	// Observed state prior to the invocation of a function pipeline. Functions
	// must not mutate this state - any attempts to do so will be ignored. State
	// passed to each function is fresh as of the time the function pipeline was
	// invoked, not as of the time each function was invoked.
	Observed Observed `json:"observed"`

	// Desired state according to a function pipeline. The state passed to a
	// particular function may have been mutated by previous functions in the
	// pipeline. Functions may mutate any part of the desired state they are
	// concerned with, and must pass through any part of the desired state that
	// they are not concerned with.
	Desired Desired `json:"desired"`

	// Results is an optional list that can be used by function to emit results
	// for observability and debugging purposes. Functions may mutate any
	// results that they are concerned with, and must pass through any results
	// that that are not concerned with.
	// +optional
	Results []Result `json:"results,omitempty"`
}

A FunctionIO represents the I/O of an Composition Function.

func (*FunctionIO) DeepCopy

func (in *FunctionIO) DeepCopy() *FunctionIO

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionIO.

func (*FunctionIO) DeepCopyInto

func (in *FunctionIO) DeepCopyInto(out *FunctionIO)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FunctionIO) DeepCopyObject

func (in *FunctionIO) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MatchConditionReadinessCheck added in v1.13.0

type MatchConditionReadinessCheck struct {
	// Type indicates the type of condition you'd like to use.
	// +kubebuilder:default="Ready"
	Type xpv1.ConditionType `json:"type"`

	// Status is the status of the condition you'd like to match.
	// +kubebuilder:default="True"
	Status corev1.ConditionStatus `json:"status"`
}

MatchConditionReadinessCheck is used to indicate how to tell whether a resource is ready for consumption

func (*MatchConditionReadinessCheck) DeepCopy added in v1.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchConditionReadinessCheck.

func (*MatchConditionReadinessCheck) DeepCopyInto added in v1.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Observed

type Observed struct {
	// Composite reflects the observed state of the XR this function reconciles.
	Composite ObservedComposite `json:"composite"`

	// Resources reflect the observed state of any extant composed resources
	// this function reconciles. Only composed resources that currently exist in
	// the API server (i.e. have been created and not yet deleted) are included.
	// +optional
	Resources []ObservedResource `json:"resources,omitempty"`
}

Observed state at the beginning of a function pipeline invocation.

func (*Observed) DeepCopy

func (in *Observed) DeepCopy() *Observed

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Observed.

func (*Observed) DeepCopyInto

func (in *Observed) DeepCopyInto(out *Observed)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObservedComposite

type ObservedComposite struct {
	// Resource reflects the observed XR.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Resource runtime.RawExtension `json:"resource"`

	// ConnectionDetails reflects the observed connection details of the XR.
	// +optional
	ConnectionDetails []ExplicitConnectionDetail `json:"connectionDetails,omitempty"`
}

An ObservedComposite resource.

func (*ObservedComposite) DeepCopy

func (in *ObservedComposite) DeepCopy() *ObservedComposite

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedComposite.

func (*ObservedComposite) DeepCopyInto

func (in *ObservedComposite) DeepCopyInto(out *ObservedComposite)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObservedResource

type ObservedResource struct {
	// Name of the observed resource. Must be unique within the array of
	// observed resources. Corresponds to the name entry in a Composition's
	// resources array, and the name entry in the desired resources array.
	Name string `json:"name"`

	// Resource reflects the observed composed resource.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Resource runtime.RawExtension `json:"resource"`

	// ConnectionDetails reflects the observed connection details of the
	// composed resource.
	ConnectionDetails []ExplicitConnectionDetail `json:"connectionDetails"`
}

An ObservedResource represents an observed composed resource.

func (*ObservedResource) DeepCopy

func (in *ObservedResource) DeepCopy() *ObservedResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedResource.

func (*ObservedResource) DeepCopyInto

func (in *ObservedResource) DeepCopyInto(out *ObservedResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReadinessCheckType

type ReadinessCheckType string

ReadinessCheckType is used for readiness check types.

const (
	ReadinessCheckTypeNonEmpty       ReadinessCheckType = "NonEmpty"
	ReadinessCheckTypeMatchString    ReadinessCheckType = "MatchString"
	ReadinessCheckTypeMatchInteger   ReadinessCheckType = "MatchInteger"
	ReadinessCheckTypeMatchCondition ReadinessCheckType = "MatchCondition"
	ReadinessCheckTypeNone           ReadinessCheckType = "None"
)

The possible values for readiness check type.

type Result

type Result struct {
	// Severity is the severity of a result.
	//
	// Fatal results are fatal; subsequent Composition Functions may run, but
	// the Composition Function pipeline run will be considered a failure and
	// the first error will be returned.
	//
	// Warning results are non-fatal; the entire Composition will run to
	// completion but warning events and debug logs associated with the
	// composite resource will be emitted.
	//
	// Normal results are emitted as normal events and debug logs associated
	// with the composite resource.
	// +kubebuilder:validation:Enum=Fatal;Warning;Normal
	Severity Severity `json:"severity"`

	// Message is a human readable message.
	Message string `json:"message"`
}

Result is an optional list that can be used by function to emit results for observability and debugging purposes.

func (*Result) DeepCopy

func (in *Result) DeepCopy() *Result

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Result.

func (*Result) DeepCopyInto

func (in *Result) DeepCopyInto(out *Result)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Severity

type Severity string

Severity is the severity of a result.

const (
	SeverityFatal   Severity = "Fatal"
	SeverityWarning Severity = "Warning"
	SeverityNormal  Severity = "Normal"
)

Result severities.

Jump to

Keyboard shortcuts

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