Documentation
¶
Overview ¶
Package v1beta1 contains the input type for the P&T Composition Function. +kubebuilder:object:generate=true +groupName=pt.fn.crossplane.io +versionName=v1beta1
Index ¶
- type Combine
- type CombineStrategy
- type CombineVariable
- type ComposedPatch
- type ComposedTemplate
- type ConnectionDetail
- type ConnectionDetailType
- type ConvertTransform
- type ConvertTransformFormat
- type Environment
- type EnvironmentPatch
- type FromFieldPathPolicy
- type MapTransform
- type MatchConditionReadinessCheck
- type MatchFallbackTo
- type MatchTransform
- type MatchTransformPattern
- type MatchTransformPatternType
- type MathTransform
- type MathTransformType
- type Patch
- type PatchPolicy
- type PatchSet
- type PatchSetPatch
- type PatchType
- type ReadinessCheck
- type ReadinessCheckType
- type Resources
- type StringCombine
- type StringConversionType
- type StringTransform
- type StringTransformJoin
- type StringTransformRegexp
- type StringTransformReplace
- type StringTransformType
- type ToFieldPathPolicy
- type Transform
- type TransformIOType
- type TransformType
- type TypeReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Combine ¶
type Combine struct {
// Variables are the list of variables whose values will be retrieved and
// combined.
// +kubebuilder:validation:MinItems=1
Variables []CombineVariable `json:"variables"`
// Strategy defines the strategy to use to combine the input variable values.
// Currently only string is supported.
// +kubebuilder:validation:Enum=string
Strategy CombineStrategy `json:"strategy"`
// String declares that input variables should be combined into a single
// string, using the relevant settings for formatting purposes.
// +optional
String *StringCombine `json:"string,omitempty"`
}
A Combine configures a patch that combines more than one input field into a single output field.
func (*Combine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Combine.
func (*Combine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CombineStrategy ¶
type CombineStrategy string
A CombineStrategy determines what strategy will be applied to combine variables.
const (
CombineStrategyString CombineStrategy = "string"
)
CombineStrategy strategy definitions.
type CombineVariable ¶
type CombineVariable struct {
// FromFieldPath is the path of the field on the source whose value is
// to be used as input.
FromFieldPath string `json:"fromFieldPath"`
}
A CombineVariable defines the source of a value that is combined with others to form and patch an output value. Currently, this only supports retrieving values from a field path.
func (*CombineVariable) DeepCopy ¶
func (in *CombineVariable) DeepCopy() *CombineVariable
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CombineVariable.
func (*CombineVariable) DeepCopyInto ¶
func (in *CombineVariable) DeepCopyInto(out *CombineVariable)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComposedPatch ¶ added in v0.3.0
type ComposedPatch struct {
// Type sets the patching behaviour to be used. Each patch type may require
// its own fields to be set on the ComposedPatch object.
// +optional
// +kubebuilder:validation:Enum=FromCompositeFieldPath;PatchSet;ToCompositeFieldPath;CombineFromComposite;CombineToComposite;FromEnvironmentFieldPath;ToEnvironmentFieldPath;CombineFromEnvironment;CombineToEnvironment
// +kubebuilder:default=FromCompositeFieldPath
Type PatchType `json:"type,omitempty"`
// PatchSetName to include patches from. Required when type is PatchSet.
// +optional
PatchSetName *string `json:"patchSetName,omitempty"`
Patch `json:",inline"`
}
ComposedPatch objects are applied between composite and composed resources. Their behaviour depends on the Type selected. The default Type, FromCompositeFieldPath, copies a value from the composite resource to the composed resource, applying any defined transformers.
func (*ComposedPatch) DeepCopy ¶ added in v0.3.0
func (in *ComposedPatch) DeepCopy() *ComposedPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposedPatch.
func (*ComposedPatch) DeepCopyInto ¶ added in v0.3.0
func (in *ComposedPatch) DeepCopyInto(out *ComposedPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComposedPatch) GetPatchSetName ¶ added in v0.3.0
func (p *ComposedPatch) GetPatchSetName() string
GetPatchSetName returns the PatchSetName for this ComposedPatch, or an empty string if it is nil.
func (*ComposedPatch) GetType ¶ added in v0.3.0
func (p *ComposedPatch) GetType() PatchType
GetType returns the patch type. If the type is not set, it returns the default type.
type ComposedTemplate ¶
type ComposedTemplate struct {
// A Name uniquely identifies this entry within its resources array.
Name string `json:"name"`
// Base of the composed resource that patches will be applied to and from.
// If base is omitted, a previous Function within the pipeline must have
// produced the named composed resource. Patches will be applied to and from
// that resource. If base is specified, and a previous Function within the
// pipeline produced the name composed resource, it will be overwritten.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:EmbeddedResource
// +optional
Base *runtime.RawExtension `json:"base,omitempty"`
// Patches to and from the composed resource.
// +optional
Patches []ComposedPatch `json:"patches,omitempty"`
// ConnectionDetails lists the propagation secret keys from this composed
// resource to the composition instance connection secret.
// +optional
ConnectionDetails []ConnectionDetail `json:"connectionDetails,omitempty"`
// ReadinessChecks allows users to define custom readiness checks. All
// checks have to return true in order for resource to be considered ready.
// The default readiness check is to have the "Ready" condition to be
// "True".
// +optional
// +kubebuilder:default={{type:"MatchCondition",matchCondition:{type:"Ready",status:"True"}}}
ReadinessChecks []ReadinessCheck `json:"readinessChecks,omitempty"`
}
ComposedTemplate is used to provide information about how the composed resource should be processed.
func (*ComposedTemplate) DeepCopy ¶
func (in *ComposedTemplate) DeepCopy() *ComposedTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComposedTemplate.
func (*ComposedTemplate) DeepCopyInto ¶
func (in *ComposedTemplate) DeepCopyInto(out *ComposedTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConnectionDetail ¶
type ConnectionDetail struct {
// Name of the connection secret key that will be propagated to the
// connection secret of the composed resource.
Name string `json:"name"`
// Type sets the connection detail fetching behavior to be used. Each
// connection detail type may require its own fields to be set on the
// ConnectionDetail object.
// +kubebuilder:validation:Enum=FromConnectionSecretKey;FromFieldPath;FromValue
Type ConnectionDetailType `json:"type"`
// FromConnectionSecretKey is the key that will be used to fetch the value
// from the composed resource's connection secret.
// +optional
FromConnectionSecretKey *string `json:"fromConnectionSecretKey,omitempty"`
// FromFieldPath is the path of the field on the composed resource whose
// value to be used as input. Name must be specified if the type is
// FromFieldPath.
// +optional
FromFieldPath *string `json:"fromFieldPath,omitempty"`
// Value that will be propagated to the connection secret of the composite
// resource. May be set to inject a fixed, non-sensitive connection secret
// value, for example a well-known port.
// +optional
Value *string `json:"value,omitempty"`
}
ConnectionDetail includes the information about the propagation of the connection information from one secret to another.
func (*ConnectionDetail) DeepCopy ¶
func (in *ConnectionDetail) DeepCopy() *ConnectionDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionDetail.
func (*ConnectionDetail) DeepCopyInto ¶
func (in *ConnectionDetail) DeepCopyInto(out *ConnectionDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConnectionDetailType ¶
type ConnectionDetailType string
A ConnectionDetailType is a type of connection detail.
const ( ConnectionDetailTypeFromConnectionSecretKey ConnectionDetailType = "FromConnectionSecretKey" ConnectionDetailTypeFromFieldPath ConnectionDetailType = "FromFieldPath" ConnectionDetailTypeFromValue ConnectionDetailType = "FromValue" )
ConnectionDetailType types.
func (*ConnectionDetailType) IsValid ¶
func (t *ConnectionDetailType) IsValid() bool
IsValid returns true if the connection detail type is valid.
type ConvertTransform ¶
type ConvertTransform struct {
// ToType is the type of the output of this transform.
// +kubebuilder:validation:Enum=string;int;int64;bool;float64;object;array
ToType TransformIOType `json:"toType"`
// The expected input format.
//
// * `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
// Only used during `string -> float64` conversions.
// * `json` - parses the input as a JSON string.
// Only used during `string -> object` or `string -> list` conversions.
//
// If this property is null, the default conversion is applied.
//
// +kubebuilder:validation:Enum=none;quantity;json
// +kubebuilder:validation:Default=none
Format *ConvertTransformFormat `json:"format,omitempty"`
}
A ConvertTransform converts the input into a new object whose type is supplied.
func (*ConvertTransform) DeepCopy ¶
func (in *ConvertTransform) DeepCopy() *ConvertTransform
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConvertTransform.
func (*ConvertTransform) DeepCopyInto ¶
func (in *ConvertTransform) DeepCopyInto(out *ConvertTransform)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConvertTransform) GetFormat ¶
func (t *ConvertTransform) GetFormat() ConvertTransformFormat
GetFormat returns the format of the transform.
type ConvertTransformFormat ¶
type ConvertTransformFormat string
ConvertTransformFormat defines the expected format of an input value of a conversion transform.
const ( ConvertTransformFormatNone ConvertTransformFormat = "none" ConvertTransformFormatQuantity ConvertTransformFormat = "quantity" ConvertTransformFormatJSON ConvertTransformFormat = "json" )
Possible ConvertTransformFormat values.
func (ConvertTransformFormat) IsValid ¶
func (c ConvertTransformFormat) IsValid() bool
IsValid returns true if the format is valid.
type Environment ¶
type Environment struct {
// Patches is a list of environment patches that are executed before a
// composition's resources are composed. These patches are between the XR
// and the Environment. Either from the Environment to the XR, or vice
// versa.
Patches []EnvironmentPatch `json:"patches,omitempty"`
}
Environment represents the Composition environment.
func (*Environment) DeepCopy ¶
func (in *Environment) DeepCopy() *Environment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Environment.
func (*Environment) DeepCopyInto ¶
func (in *Environment) DeepCopyInto(out *Environment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvironmentPatch ¶ added in v0.3.0
type EnvironmentPatch struct {
// Type sets the patching behaviour to be used. Each patch type may require
// its own fields to be set on the Patch object.
// +optional
// +kubebuilder:validation:Enum=FromCompositeFieldPath;ToCompositeFieldPath;CombineFromComposite;CombineToComposite;FromEnvironmentFieldPath;ToEnvironmentFieldPath
// +kubebuilder:default=FromCompositeFieldPath
Type PatchType `json:"type,omitempty"`
Patch `json:",inline"`
}
EnvironmentPatch objects are applied between the composite resource and the environment. Their behaviour depends on the Type selected. The default Type, FromCompositeFieldPath, copies a value from the composite resource to the environment, applying any defined transformers.
func (*EnvironmentPatch) DeepCopy ¶ added in v0.3.0
func (in *EnvironmentPatch) DeepCopy() *EnvironmentPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentPatch.
func (*EnvironmentPatch) DeepCopyInto ¶ added in v0.3.0
func (in *EnvironmentPatch) DeepCopyInto(out *EnvironmentPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvironmentPatch) GetType ¶ added in v0.3.0
func (ep *EnvironmentPatch) GetType() PatchType
GetType returns the patch type. If the type is not set, it returns the default type.
type FromFieldPathPolicy ¶
type FromFieldPathPolicy string
A FromFieldPathPolicy determines how to patch from a field path.
const ( FromFieldPathPolicyOptional FromFieldPathPolicy = "Optional" FromFieldPathPolicyRequired FromFieldPathPolicy = "Required" )
FromFieldPath patch policies.
type MapTransform ¶
type MapTransform struct {
// Pairs is the map that will be used for transform.
// +optional
Pairs map[string]extv1.JSON `json:",inline"`
}
MapTransform returns a value for the input from the given map.
func (*MapTransform) DeepCopy ¶
func (in *MapTransform) DeepCopy() *MapTransform
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MapTransform.
func (*MapTransform) DeepCopyInto ¶
func (in *MapTransform) DeepCopyInto(out *MapTransform)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MapTransform) MarshalJSON ¶
func (m *MapTransform) MarshalJSON() ([]byte, error)
MarshalJSON from this MapTransform.
func (*MapTransform) UnmarshalJSON ¶
func (m *MapTransform) UnmarshalJSON(b []byte) error
UnmarshalJSON into this MapTransform.
type MatchConditionReadinessCheck ¶
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 ¶
func (in *MatchConditionReadinessCheck) DeepCopy() *MatchConditionReadinessCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchConditionReadinessCheck.
func (*MatchConditionReadinessCheck) DeepCopyInto ¶
func (in *MatchConditionReadinessCheck) DeepCopyInto(out *MatchConditionReadinessCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchFallbackTo ¶
type MatchFallbackTo string
MatchFallbackTo defines how a match operation will fallback.
const ( MatchFallbackToTypeValue MatchFallbackTo = "Value" MatchFallbackToTypeInput MatchFallbackTo = "Input" )
Valid MatchFallbackTo.
type MatchTransform ¶
type MatchTransform struct {
// The patterns that should be tested against the input string.
// Patterns are tested in order. The value of the first match is used as
// result of this transform.
Patterns []MatchTransformPattern `json:"patterns,omitempty"`
// The fallback value that should be returned by the transform if now pattern
// matches.
FallbackValue extv1.JSON `json:"fallbackValue,omitempty"`
// Determines to what value the transform should fallback if no pattern matches.
// +optional
// +kubebuilder:validation:Enum=Value;Input
// +kubebuilder:default=Value
FallbackTo MatchFallbackTo `json:"fallbackTo,omitempty"`
}
MatchTransform is a more complex version of a map transform that matches a list of patterns.
func (*MatchTransform) DeepCopy ¶
func (in *MatchTransform) DeepCopy() *MatchTransform
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchTransform.
func (*MatchTransform) DeepCopyInto ¶
func (in *MatchTransform) DeepCopyInto(out *MatchTransform)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchTransformPattern ¶
type MatchTransformPattern struct {
// Type specifies how the pattern matches the input.
//
// * `literal` - the pattern value has to exactly match (case sensitive) the
// input string. This is the default.
//
// * `regexp` - the pattern treated as a regular expression against
// which the input string is tested. Crossplane will throw an error if the
// key is not a valid regexp.
//
// +kubebuilder:validation:Enum=literal;regexp
// +kubebuilder:default=literal
Type MatchTransformPatternType `json:"type"`
// Literal exactly matches the input string (case sensitive).
// Is required if `type` is `literal`.
Literal *string `json:"literal,omitempty"`
// Regexp to match against the input string.
// Is required if `type` is `regexp`.
Regexp *string `json:"regexp,omitempty"`
// The value that is used as result of the transform if the pattern matches.
Result extv1.JSON `json:"result"`
}
MatchTransformPattern is a transform that returns the value that matches a pattern.
func (*MatchTransformPattern) DeepCopy ¶
func (in *MatchTransformPattern) DeepCopy() *MatchTransformPattern
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchTransformPattern.
func (*MatchTransformPattern) DeepCopyInto ¶
func (in *MatchTransformPattern) DeepCopyInto(out *MatchTransformPattern)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchTransformPatternType ¶
type MatchTransformPatternType string
MatchTransformPatternType defines the type of a MatchTransformPattern.
const ( MatchTransformPatternTypeLiteral MatchTransformPatternType = "literal" MatchTransformPatternTypeRegexp MatchTransformPatternType = "regexp" )
Valid MatchTransformPatternTypes.
type MathTransform ¶
type MathTransform struct {
// Type of the math transform to be run.
// +optional
// +kubebuilder:validation:Enum=Multiply;ClampMin;ClampMax
// +kubebuilder:default=Multiply
Type MathTransformType `json:"type,omitempty"`
// Multiply the value.
// +optional
Multiply *int64 `json:"multiply,omitempty"`
// ClampMin makes sure that the value is not smaller than the given value.
// +optional
ClampMin *int64 `json:"clampMin,omitempty"`
// ClampMax makes sure that the value is not bigger than the given value.
// +optional
ClampMax *int64 `json:"clampMax,omitempty"`
}
MathTransform conducts mathematical operations on the input with the given configuration in its properties.
func (*MathTransform) DeepCopy ¶
func (in *MathTransform) DeepCopy() *MathTransform
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MathTransform.
func (*MathTransform) DeepCopyInto ¶
func (in *MathTransform) DeepCopyInto(out *MathTransform)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MathTransformType ¶
type MathTransformType string
MathTransformType conducts mathematical operations.
const ( MathTransformTypeMultiply MathTransformType = "Multiply" // Default MathTransformTypeClampMin MathTransformType = "ClampMin" MathTransformTypeClampMax MathTransformType = "ClampMax" )
Accepted MathTransformType.
type Patch ¶
type Patch struct {
// FromFieldPath is the path of the field on the resource whose value is
// to be used as input. Required when type is FromCompositeFieldPath or
// ToCompositeFieldPath.
// +optional
FromFieldPath *string `json:"fromFieldPath,omitempty"`
// Combine is the patch configuration for a CombineFromComposite,
// CombineToComposite patch.
// +optional
Combine *Combine `json:"combine,omitempty"`
// ToFieldPath is the path of the field on the resource whose value will
// be changed with the result of transforms. Leave empty if you'd like to
// propagate to the same path as fromFieldPath.
// +optional
ToFieldPath *string `json:"toFieldPath,omitempty"`
// Transforms are the list of functions that are used as a FIFO pipe for the
// input to be transformed.
// +optional
Transforms []Transform `json:"transforms,omitempty"`
// Policy configures the specifics of patching behaviour.
// +optional
Policy *PatchPolicy `json:"policy,omitempty"`
}
Patch defines a patch between a source and destination.
func (*Patch) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.
func (*Patch) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Patch) GetCombine ¶ added in v0.3.0
GetCombine returns the Combine for this ComposedPatch, or nil if it is nil.
func (*Patch) GetFromFieldPath ¶
GetFromFieldPath returns the FromFieldPath for this Patch, or an empty string if it is nil.
func (*Patch) GetPolicy ¶ added in v0.3.0
func (p *Patch) GetPolicy() *PatchPolicy
GetPolicy returns the PatchPolicy for this ComposedPatch, or nil if it is nil.
func (*Patch) GetToFieldPath ¶
GetToFieldPath returns the ToFieldPath for this Patch, or an empty string if it is nil.
func (*Patch) GetTransforms ¶ added in v0.3.0
GetTransforms returns the Transforms for this ComposedPatch, or nil if it is nil.
type PatchPolicy ¶
type PatchPolicy struct {
// FromFieldPath specifies how to patch from a field path. The default is
// 'Optional', which means the patch will be a no-op if the specified
// fromFieldPath does not exist. Use 'Required' to prevent the creation of a
// new composed resource until the required path exists.
// +kubebuilder:validation:Enum=Optional;Required
// +optional
FromFieldPath *FromFieldPathPolicy `json:"fromFieldPath,omitempty"`
// ToFieldPath specifies how to patch to a field path. The default is
// 'Replace', which means the patch will completely replace the target field,
// or create it if it does not exist. Use 'MergeObjects' to recursively merge the patch
// object with the target object, while keeping target object keys, but overwriting any array values, or use
// 'MergeObjectsAppendArrays' to recursively merge the patch object with the target object, while keeping
// target object keys and appending any array values to target array values, or use
// 'ForceMergeObjects' to recursively merge the patch object with the target object, overwriting
// any target object keys, including array values, or use
// 'ForceMergeObjectsAppendArrays' to recursively merge the patch object with the target object,
// overwriting target object keys, and appending any array values to target array values.
// 'MergeObject' is deprecated, use 'MergeObjects' instead, which is functionally identical.
// 'AppendArray' is deprecated, use 'ForceMergeObjectsAppendArrays' instead, which is functionally identical.
// +kubebuilder:validation:Enum=Replace;MergeObjects;MergeObjectsAppendArrays;ForceMergeObjects;ForceMergeObjectsAppendArrays;MergeObject;AppendArray
// +optional
ToFieldPath *ToFieldPathPolicy `json:"toFieldPath,omitempty"`
}
A PatchPolicy configures the specifics of patching behaviour.
func (*PatchPolicy) DeepCopy ¶
func (in *PatchPolicy) DeepCopy() *PatchPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchPolicy.
func (*PatchPolicy) DeepCopyInto ¶
func (in *PatchPolicy) DeepCopyInto(out *PatchPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PatchPolicy) GetFromFieldPathPolicy ¶
func (pp *PatchPolicy) GetFromFieldPathPolicy() FromFieldPathPolicy
GetFromFieldPathPolicy returns the FromFieldPathPolicy for this PatchPolicy, defaulting to FromFieldPathPolicyOptional if not specified.
func (*PatchPolicy) GetToFieldPathPolicy ¶ added in v0.4.0
func (pp *PatchPolicy) GetToFieldPathPolicy() ToFieldPathPolicy
GetToFieldPathPolicy returns the ToFieldPathPolicy for this PatchPolicy, defaulting to ToFieldPathPolicyReplace if not specified.
type PatchSet ¶
type PatchSet struct {
// Name of this PatchSet.
Name string `json:"name"`
// Patches will be applied as an overlay to the base resource.
Patches []PatchSetPatch `json:"patches"`
}
A PatchSet is a set of patches that can be reused from all resources.
func (*PatchSet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchSet.
func (*PatchSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PatchSet) GetComposedPatches ¶ added in v0.3.0
func (ps *PatchSet) GetComposedPatches() []ComposedPatch
GetComposedPatches returns the composed patches from the patch set.
type PatchSetPatch ¶ added in v0.3.0
type PatchSetPatch struct {
// Type sets the patching behaviour to be used. Each patch type may require
// its own fields to be set on the ComposedPatch object.
// +optional
// +kubebuilder:validation:Enum=FromCompositeFieldPath;ToCompositeFieldPath;CombineFromComposite;CombineToComposite;FromEnvironmentFieldPath;ToEnvironmentFieldPath;CombineFromEnvironment;CombineToEnvironment
// +kubebuilder:default=FromCompositeFieldPath
Type PatchType `json:"type,omitempty"`
Patch `json:",inline"`
}
PatchSetPatch defines a set of Patches that can be referenced by name by other patches of type PatchSet.
func (*PatchSetPatch) DeepCopy ¶ added in v0.3.0
func (in *PatchSetPatch) DeepCopy() *PatchSetPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchSetPatch.
func (*PatchSetPatch) DeepCopyInto ¶ added in v0.3.0
func (in *PatchSetPatch) DeepCopyInto(out *PatchSetPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PatchSetPatch) GetType ¶ added in v0.3.0
func (psp *PatchSetPatch) GetType() PatchType
GetType returns the patch type. If the type is not set, it returns the default type.
type PatchType ¶
type PatchType string
A PatchType is a type of patch.
const ( PatchTypeFromCompositeFieldPath PatchType = "FromCompositeFieldPath" // Default PatchTypePatchSet PatchType = "PatchSet" PatchTypeToCompositeFieldPath PatchType = "ToCompositeFieldPath" PatchTypeCombineFromComposite PatchType = "CombineFromComposite" PatchTypeCombineToComposite PatchType = "CombineToComposite" )
Patch types.
const ( PatchTypeFromEnvironmentFieldPath PatchType = "FromEnvironmentFieldPath" PatchTypeToEnvironmentFieldPath PatchType = "ToEnvironmentFieldPath" PatchTypeCombineFromEnvironment PatchType = "CombineFromEnvironment" PatchTypeCombineToEnvironment PatchType = "CombineToEnvironment" )
Environment patch types.
COMPOSITION ENVIRONMENT IS AN ALPHA FEATURE. These patch types may be changed or removed without notice.
type ReadinessCheck ¶
type ReadinessCheck struct {
// Type indicates the type of probe you'd like to use.
// +kubebuilder:validation:Enum="MatchString";"MatchInteger";"NonEmpty";"MatchCondition";"MatchTrue";"MatchFalse";"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"`
}
ReadinessCheck is used to indicate how to tell whether a resource is ready for consumption
func (*ReadinessCheck) DeepCopy ¶
func (in *ReadinessCheck) DeepCopy() *ReadinessCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadinessCheck.
func (*ReadinessCheck) DeepCopyInto ¶
func (in *ReadinessCheck) DeepCopyInto(out *ReadinessCheck)
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" ReadinessCheckTypeMatchTrue ReadinessCheckType = "MatchTrue" ReadinessCheckTypeMatchFalse ReadinessCheckType = "MatchFalse" ReadinessCheckTypeMatchCondition ReadinessCheckType = "MatchCondition" ReadinessCheckTypeNone ReadinessCheckType = "None" )
The possible values for readiness check type.
func (*ReadinessCheckType) IsValid ¶
func (t *ReadinessCheckType) IsValid() bool
IsValid returns true if the readiness check type is valid.
type Resources ¶
type Resources struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// PatchSets define a named set of patches that may be included by any
// resource. PatchSets cannot themselves refer to other PatchSets.
// +optional
PatchSets []PatchSet `json:"patchSets,omitempty"`
// Environment represents the Composition environment.
//
// THIS IS AN ALPHA FIELD.
// Do not use it in production. It may be changed or removed without notice.
// +optional
Environment *Environment `json:"environment,omitempty"`
// Resources is a list of resource templates that will be used when a
// composite resource is created.
Resources []ComposedTemplate `json:"resources"`
}
Resources specifies Patch & Transform resource templates. +kubebuilder:resource:categories=crossplane
func (*Resources) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Resources) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StringCombine ¶
type StringCombine struct {
// Format the input using a Go format string. See
// https://golang.org/pkg/fmt/ for details.
Format string `json:"fmt"`
}
A StringCombine combines multiple input values into a single string.
func (*StringCombine) DeepCopy ¶
func (in *StringCombine) DeepCopy() *StringCombine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringCombine.
func (*StringCombine) DeepCopyInto ¶
func (in *StringCombine) DeepCopyInto(out *StringCombine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringConversionType ¶
type StringConversionType string
StringConversionType converts a string.
const ( StringConversionTypeToUpper StringConversionType = "ToUpper" StringConversionTypeToLower StringConversionType = "ToLower" StringConversionTypeToJSON StringConversionType = "ToJson" StringConversionTypeToBase64 StringConversionType = "ToBase64" StringConversionTypeFromBase64 StringConversionType = "FromBase64" StringConversionTypeToSHA1 StringConversionType = "ToSha1" StringConversionTypeToSHA256 StringConversionType = "ToSha256" StringConversionTypeToSHA512 StringConversionType = "ToSha512" StringConversionTypeToAdler32 StringConversionType = "ToAdler32" )
Accepted StringConversionTypes.
type StringTransform ¶
type StringTransform struct {
// Type of the string transform to be run.
// +kubebuilder:validation:Enum=Format;Convert;TrimPrefix;TrimSuffix;Regexp
// +kubebuilder:default=Format
Type StringTransformType `json:"type"`
// Format the input using a Go format string. See
// https://golang.org/pkg/fmt/ for details.
// +optional
Format *string `json:"fmt,omitempty"`
// Optional conversion method to be specified.
// `ToUpper` and `ToLower` change the letter case of the input string.
// `ToBase64` and `FromBase64` perform a base64 conversion based on the input string.
// `ToJson` converts any input value into its raw JSON representation.
// `ToSha1`, `ToSha256` and `ToSha512` generate a hash value based on the input
// converted to JSON.
// +optional
// +kubebuilder:validation:Enum=ToUpper;ToLower;ToBase64;FromBase64;ToJson;ToSha1;ToSha256;ToSha512
Convert *StringConversionType `json:"convert,omitempty"`
// Trim the prefix or suffix from the input
// +optional
Trim *string `json:"trim,omitempty"`
// Extract a match from the input using a regular expression.
// +optional
Regexp *StringTransformRegexp `json:"regexp,omitempty"`
// Join the input strings.
// +optional
Join *StringTransformJoin `json:"join,omitempty"`
// Search/Replace applied to the input string.
// +optional
Replace *StringTransformReplace `json:"replace,omitempty"`
}
A StringTransform returns a string given the supplied input.
func (*StringTransform) DeepCopy ¶
func (in *StringTransform) DeepCopy() *StringTransform
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringTransform.
func (*StringTransform) DeepCopyInto ¶
func (in *StringTransform) DeepCopyInto(out *StringTransform)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringTransformJoin ¶ added in v0.7.0
type StringTransformJoin struct {
// Separator to join the input strings.
Separator string `json:"separator"`
}
A StringTransformJoin joins the input strings.
func (*StringTransformJoin) DeepCopy ¶ added in v0.7.0
func (in *StringTransformJoin) DeepCopy() *StringTransformJoin
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringTransformJoin.
func (*StringTransformJoin) DeepCopyInto ¶ added in v0.7.0
func (in *StringTransformJoin) DeepCopyInto(out *StringTransformJoin)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringTransformRegexp ¶
type StringTransformRegexp struct {
// Match string. May optionally include submatches, aka capture groups.
// See https://pkg.go.dev/regexp/ for details.
Match string `json:"match"`
// Group number to match. 0 (the default) matches the entire expression.
// +optional
Group *int `json:"group,omitempty"`
}
A StringTransformRegexp extracts a match from the input using a regular expression.
func (*StringTransformRegexp) DeepCopy ¶
func (in *StringTransformRegexp) DeepCopy() *StringTransformRegexp
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringTransformRegexp.
func (*StringTransformRegexp) DeepCopyInto ¶
func (in *StringTransformRegexp) DeepCopyInto(out *StringTransformRegexp)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringTransformReplace ¶ added in v0.7.0
type StringTransformReplace struct {
// The Search string to match.
Search string `json:"search"`
// The Replace string replaces all occurrences of the search string.
Replace string `json:"replace"`
}
A StringTransformReplace replaces the search string with the replacement string.
func (*StringTransformReplace) DeepCopy ¶ added in v0.7.0
func (in *StringTransformReplace) DeepCopy() *StringTransformReplace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringTransformReplace.
func (*StringTransformReplace) DeepCopyInto ¶ added in v0.7.0
func (in *StringTransformReplace) DeepCopyInto(out *StringTransformReplace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringTransformType ¶
type StringTransformType string
StringTransformType transforms a string.
const ( StringTransformTypeFormat StringTransformType = "Format" // Default StringTransformTypeConvert StringTransformType = "Convert" StringTransformTypeTrimPrefix StringTransformType = "TrimPrefix" StringTransformTypeTrimSuffix StringTransformType = "TrimSuffix" StringTransformTypeRegexp StringTransformType = "Regexp" StringTransformTypeJoin StringTransformType = "Join" StringTransformTypeReplace StringTransformType = "Replace" )
Accepted StringTransformTypes.
type ToFieldPathPolicy ¶ added in v0.4.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" // Deprecated: Use MergeObjects, which is functionally identical. ToFieldPathPolicyMergeObject ToFieldPathPolicy = "MergeObject" // Deprecated: Use ForceMergeObjectsAppendArrays, which is functionally identical. ToFieldPathPolicyAppendArray ToFieldPathPolicy = "AppendArray" )
ToFieldPath patch policies.
type Transform ¶
type Transform struct {
// Type of the transform to be run.
// +kubebuilder:validation:Enum=map;match;math;string;convert
Type TransformType `json:"type"`
// Math is used to transform the input via mathematical operations such as
// multiplication.
// +optional
Math *MathTransform `json:"math,omitempty"`
// Map uses the input as a key in the given map and returns the value.
// +optional
Map *MapTransform `json:"map,omitempty"`
// Match is a more complex version of Map that matches a list of patterns.
// +optional
Match *MatchTransform `json:"match,omitempty"`
// String is used to transform the input into a string or a different kind
// of string. Note that the input does not necessarily need to be a string.
// +optional
String *StringTransform `json:"string,omitempty"`
// Convert is used to cast the input into the given output type.
// +optional
Convert *ConvertTransform `json:"convert,omitempty"`
}
Transform is a unit of process whose input is transformed into an output with the supplied configuration.
func (*Transform) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Transform.
func (*Transform) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Transform) GetOutputType ¶
func (t *Transform) GetOutputType() (*TransformIOType, error)
GetOutputType returns the output type of the transform. It returns an error if the transform type is unknown. It returns nil if the output type is not known.
type TransformIOType ¶
type TransformIOType string
TransformIOType defines the type of a ConvertTransform.
const ( TransformIOTypeString TransformIOType = "string" TransformIOTypeBool TransformIOType = "bool" TransformIOTypeInt TransformIOType = "int" TransformIOTypeInt64 TransformIOType = "int64" TransformIOTypeFloat64 TransformIOType = "float64" TransformIOTypeObject TransformIOType = "object" TransformIOTypeArray TransformIOType = "array" )
The list of supported Transform input and output types.
func (TransformIOType) IsValid ¶
func (c TransformIOType) IsValid() bool
IsValid checks if the given TransformIOType is valid.
type TransformType ¶
type TransformType string
TransformType is type of the transform function to be chosen.
const ( ErrFmtConvertFormatPairNotSupported = "conversion from %s to %s is not supported with format %s" TransformTypeMap TransformType = "map" TransformTypeMatch TransformType = "match" TransformTypeMath TransformType = "math" TransformTypeString TransformType = "string" TransformTypeConvert TransformType = "convert" )
Accepted TransformTypes.
type TypeReference ¶
type TypeReference struct {
// APIVersion of the type.
APIVersion string `json:"apiVersion"`
// Kind of the type.
Kind string `json:"kind"`
}
TypeReference is used to refer to a type for declaring compatibility.
func TypeReferenceTo ¶
func TypeReferenceTo(gvk schema.GroupVersionKind) TypeReference
TypeReferenceTo returns a reference to the supplied GroupVersionKind
func (*TypeReference) DeepCopy ¶
func (in *TypeReference) DeepCopy() *TypeReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeReference.
func (*TypeReference) DeepCopyInto ¶
func (in *TypeReference) DeepCopyInto(out *TypeReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.