Documentation ¶
Overview ¶
Package pipelinecomposition is a package for converting patch-and-transform Compositions to a function pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct { // Arguments. InputFile string `` /* 132-byte string literal not displayed */ // Flags. OutputFile string `` /* 136-byte string literal not displayed */ FunctionName string `` /* 138-byte string literal not displayed */ // contains filtered or unexported fields }
Cmd arguments and flags for converting a patch-and-transform to a function pipeline composition.
type ComposedTemplate ¶ added in v1.16.0
type ComposedTemplate struct { v1.ComposedTemplate Patches []Patch `json:"patches,omitempty"` }
ComposedTemplate wrapper around v1.ComposedTemplate with custom Patch.
func MigratePatchPolicyInResources ¶ added in v1.16.0
func MigratePatchPolicyInResources(resources []v1.ComposedTemplate) []ComposedTemplate
MigratePatchPolicyInResources processes all the patches in the given resources to migrate their patch policies.
type Environment ¶ added in v1.16.0
type Environment struct {
Patches []EnvironmentPatch `json:"patches,omitempty"`
}
Environment represents the Composition environment.
func MigratePatchPolicyInEnvironment ¶ added in v1.16.0
func MigratePatchPolicyInEnvironment(ec *v1.EnvironmentConfiguration) *Environment
MigratePatchPolicyInEnvironment processes all the patches in the given environment configuration to migrate their patch policies.
type EnvironmentPatch ¶ added in v1.16.0
type EnvironmentPatch struct { v1.EnvironmentPatch Policy *PatchPolicy `json:"policy,omitempty"` }
EnvironmentPatch wrapper around v1.EnvironmentPatch with custom PatchPolicy.
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"` }
Input represents the input to the patch-and-transform function. This struct originates 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 Note that it does not exactly match the target type with full fidelity. This type is used during the processing and conversion of the given input, but the final converted output is written in an unstructured manner without a static type definition for more flexibility.
type Patch ¶ added in v1.16.0
type Patch struct { v1.Patch Policy *PatchPolicy `json:"policy,omitempty"` }
Patch wrapper around v1.Patch with custom PatchPolicy.
type PatchPolicy ¶ added in v1.16.0
type PatchPolicy struct { FromFieldPath *v1.FromFieldPathPolicy `json:"fromFieldPath,omitempty"` ToFieldPath *ToFieldPathPolicy `json:"toFieldPath,omitempty"` }
PatchPolicy defines the policy for a patch.
type PatchSet ¶ added in v1.16.0
type PatchSet struct { // Name of this PatchSet. Name string `json:"name"` Patches []Patch `json:"patches"` }
PatchSet wrapper around v1.PatchSet with custom Patch.
func MigratePatchPolicyInPatchSets ¶ added in v1.16.0
MigratePatchPolicyInPatchSets processes all the patches in the given patch set to migrate their patch policies.
type ToFieldPathPolicy ¶ added in v1.16.0
type ToFieldPathPolicy string
A ToFieldPathPolicy determines how to patch to a field path.
const ( ToFieldPathPolicyReplace ToFieldPathPolicy = "Replace" ToFieldPathPolicyMergeObjects ToFieldPathPolicy = "MergeObjects" ToFieldPathPolicyMergeObjectsAppendArrays ToFieldPathPolicy = "MergeObjectsAppendArrays" ToFieldPathPolicyForceMergeObjects ToFieldPathPolicy = "ForceMergeObjects" ToFieldPathPolicyForceMergeObjectsAppendArrays ToFieldPathPolicy = "ForceMergeObjectsAppendArrays" )
ToFieldPathPatchPolicy defines the policy for the ToFieldPath in a Patch.