newpipelinecomposition

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNilComposition = "provided Composition is empty"
)

Variables

This section is empty.

Functions

func NewPatchAndTransformFunctionInput

func NewPatchAndTransformFunctionInput(input *Input) *runtime.RawExtension

Configure Input Function. Since we are migrating legacy Patch & Transform, we convert to

func NewPipelineCompositionFromExisting

func NewPipelineCompositionFromExisting(c *v1.Composition, functionRefName string) (*v1.Composition, error)

NewPipelineCompositionFromExisting takes an existing composition and returns a composition where the built-in patch & transform has been moved to a function. if the existing composition has PipelineMode enabled, it will not change anything

func SetMissingConnectionDetailFields

func SetMissingConnectionDetailFields(sk v1.ConnectionDetail) v1.ConnectionDetail

func SetMissingEnvironmentPatchFields added in v0.11.0

func SetMissingEnvironmentPatchFields(patch v1.EnvironmentPatch) v1.EnvironmentPatch

func SetMissingPatchFields

func SetMissingPatchFields(patch v1.Patch) v1.Patch

func SetMissingPatchSetFields

func SetMissingPatchSetFields(patchSet v1.PatchSet) v1.PatchSet

func SetMissingResourceFields

func SetMissingResourceFields(idx int, rs v1.ComposedTemplate) v1.ComposedTemplate

func SetTransformTypeRequiredFields

func SetTransformTypeRequiredFields(tt v1.Transform) v1.Transform

SetTransformTypeRequiredFields sets fields that are required with function-patch-and-transform but were optional with the built-in engine

Types

type Cmd

type Cmd struct {
	// Arguments.
	InputFile string `short:"i" type:"path" placeholder:"PATH" help:"The Composition file to be converted."`

	OutputFile   string `short:"o" type:"path" placeholder:"PATH" help:"The file to write the generated Composition to."`
	FunctionName string `short:"f" type:"string" placeholder:"STRING" help:"FunctionRefName. Defaults to function-patch-and-transform."`
}

Cmd arguments and flags for render subcommand.

func (*Cmd) Help

func (c *Cmd) Help() string

func (*Cmd) Run

func (c *Cmd) Run() error

type Input

type Input struct {
	// PatchSets define a named set of patches that may be included by any
	// resource in this Composition. PatchSets cannot themselves refer to other
	// PatchSets.
	//
	// PatchSets are only used by the "Resources" mode of Composition. They
	// are ignored by other modes.
	// +optional
	PatchSets []v1.PatchSet `json:"patchSets,omitempty"`

	// Environment configures the environment in which resources are rendered.
	//
	// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
	// unless the relevant Crossplane feature flag is enabled, and may be
	// changed or removed without notice.
	// +optional
	Environment *v1.EnvironmentConfiguration `json:"environment,omitempty"`

	// Resources is a list of resource templates that will be used when a
	// composite resource referring to this composition is created.
	//
	// Resources are only used by the "Resources" mode of Composition. They are
	// ignored by other modes.
	// +optional
	Resources []v1.ComposedTemplate `json:"resources,omitempty"`
}

This struct is copied from function patch and transform, as we can't import it directly https://github.com/crossplane-contrib/function-patch-and-transform/blob/main/input/v1beta1/resources.go

func SetMissingInputFields

func SetMissingInputFields(input *Input) *Input

Jump to

Keyboard shortcuts

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