v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package v1beta1 contains the input type for the cue function runner. +kubebuilder:object:generate=true +groupName=cue.fn.crossplane.io +versionName=v1beta1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CueInput

type CueInput struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Source of this script. Currently only Inline is supported.
	// +kubebuilder:validation:Enum=Inline
	// +kubebuilder:default=Inline
	Source ScriptSource `json:"source"`
	// Script specifies an inline script
	// +optional
	Script string `json:"script,omitempty"`
	// RequestVar is the variable name that the function will use to provide inputs to the
	// cue script. Defaults to "#request"
	RequestVar string `json:"requestVar,omitempty"`
	// ResponseVar is the variable name that the function will expect the response to be returned as.
	// Defaults to "response". The special value "." means "use the entire object returned by the script".
	ResponseVar string `json:"responseVar,omitempty"`
	// LegacyDesiredOnlyResponse provides backward compatibility with older versions
	// of the function when the function only expected the desired state to be returned.
	// When set, the response is unmarshalled into a State message instead of
	// the RunFunctionResponse message.
	// Deprecated: This attribute will be removed in a future release.
	LegacyDesiredOnlyResponse bool `json:"legacyDesiredOnlyResponse,omitempty"`
	// Debug prints inputs to and outputs of the cue script for all XRs.
	// Inputs are pre-processed to remove typically irrelevant information like
	// the last applied kubectl annotation, managed fields etc.
	// Objects are displayed in compact cue format. (the equivalent of `cue fmt -s`)
	// When false, individual XRs can still be debugged by annotating them with
	//    function-cue/debug: "true"
	// +optional
	Debug bool `json:"debug,omitempty"`
	// DebugNew controls whether a new XR that is being processed by the function
	// has debug output. A "new" XR is determined by the request having only an
	// observed composite but no other observed resources. This allows debug output for
	// first-time reconciles of XRs when the user has not yet had the opportunity to
	// annotate them.
	// +optional
	DebugNew bool `json:"debugNew,omitempty"`
	// DebugRaw disables the pre-processing of inputs.
	// +optional
	DebugRaw bool `json:"debugRaw,omitempty"`
	// DebugScript displays the full generated script that is executed.
	// +optional
	DebugScript bool `json:"debugScript,omitempty"`
}

CueInput can be used to provide input to the function. +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:resource:categories=crossplane

func (*CueInput) DeepCopy

func (in *CueInput) DeepCopy() *CueInput

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

func (*CueInput) DeepCopyInto

func (in *CueInput) DeepCopyInto(out *CueInput)

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

func (*CueInput) DeepCopyObject

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

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

type ScriptSource

type ScriptSource string

A ScriptSource is a source from which a script can be loaded.

const (
	// ScriptSourceInline specifies a script inline.
	ScriptSourceInline ScriptSource = "Inline"
)

Supported script sources.

Jump to

Keyboard shortcuts

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