Documentation ¶
Overview ¶
Package v1beta1 contains the input type for this Function +kubebuilder:object:generate=true +groupName=extra-resources.fn.crossplane.io +versionName=v1beta1
Index ¶
- type FromFieldPathPolicy
- type Input
- type InputSpec
- type PatchPolicy
- type Policy
- type ResourceSource
- type ResourceSourceReference
- type ResourceSourceSelector
- type ResourceSourceSelectorLabelMatcher
- func (in *ResourceSourceSelectorLabelMatcher) DeepCopy() *ResourceSourceSelectorLabelMatcher
- func (in *ResourceSourceSelectorLabelMatcher) DeepCopyInto(out *ResourceSourceSelectorLabelMatcher)
- func (e *ResourceSourceSelectorLabelMatcher) FromFieldPathIsOptional() bool
- func (e *ResourceSourceSelectorLabelMatcher) GetType() ResourceSourceSelectorLabelMatcherType
- type ResourceSourceSelectorLabelMatcherType
- type ResourceSourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Input ¶
type Input struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec is the input to this function. Spec InputSpec `json:"spec,omitempty"` }
Input can be used to provide input to this Function. +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:resource:categories=crossplane
func (*Input) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Input.
func (*Input) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Input) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InputSpec ¶
type InputSpec struct { // ExtraResources selects a list of `ExtraResource`s. The resolved // resources are stored in the composite resource at // `spec.extraResourceRefs` and is only updated if it is null. ExtraResources []ResourceSource `json:"extraResources"` // Policy represents the Resolution policies which apply to all // ResourceSourceReferences in ExtraResources list. // +optional Policy *Policy `json:"policy,omitempty"` }
An InputSpec specifies extra resource(s) for rendering composed resources.
func (*InputSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InputSpec.
func (*InputSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-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' if the patch should fail if // the specified path does not exist. // +kubebuilder:validation:Enum=Optional;Required // +optional FromFieldPath *FromFieldPathPolicy `json:"fromFieldPath,omitempty"` MergeOptions *xpv1.MergeOptions `json:"mergeOptions,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.
type Policy ¶
type Policy struct { // Resolution specifies whether resolution of this reference is required. // The default is 'Required', which means the reconcile will fail if the // reference cannot be resolved. 'Optional' means this reference will be // a no-op if it cannot be resolved. // +optional // +kubebuilder:default=Required // +kubebuilder:validation:Enum=Required;Optional Resolution *xpv1.ResolutionPolicy `json:"resolution,omitempty"` }
Policy represents the Resolution policy of Reference instance.
func (*Policy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) IsResolutionPolicyOptional ¶
IsResolutionPolicyOptional checks whether the resolution policy of relevant reference is Optional.
type ResourceSource ¶
type ResourceSource struct { // Type specifies the way the ExtraResource is selected. // Default is `Reference` // +optional // +kubebuilder:validation:Enum=Reference;Selector // +kubebuilder:default=Reference Type ResourceSourceType `json:"type,omitempty"` // Ref is a named reference to a single ExtraResource. // Either Ref or Selector is required. // +optional Ref *ResourceSourceReference `json:"ref,omitempty"` // Selector selects ExtraResource(s) via labels. // +optional Selector *ResourceSourceSelector `json:"selector,omitempty"` // Kind is the kubernetes kind of the target extra resource(s). Kind string `json:"kind,omitempty"` // APIVersion is the kubernetes API Version of the target extra resource(s). APIVersion string `json:"apiVersion,omitempty"` // Into is the key into which extra resources for this selector will be placed. Into string `json:"into"` }
ResourceSource selects a ExtraResource.
func (*ResourceSource) DeepCopy ¶
func (in *ResourceSource) DeepCopy() *ResourceSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSource.
func (*ResourceSource) DeepCopyInto ¶
func (in *ResourceSource) DeepCopyInto(out *ResourceSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceSource) GetType ¶
func (e *ResourceSource) GetType() ResourceSourceType
GetType returns the type of the resource source, returning the default if not set.
type ResourceSourceReference ¶
type ResourceSourceReference struct { // The name of the object. Name string `json:"name"` }
An ResourceSourceReference references an ExtraResource by it's name.
func (*ResourceSourceReference) DeepCopy ¶
func (in *ResourceSourceReference) DeepCopy() *ResourceSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSourceReference.
func (*ResourceSourceReference) DeepCopyInto ¶
func (in *ResourceSourceReference) DeepCopyInto(out *ResourceSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSourceSelector ¶
type ResourceSourceSelector struct { // MaxMatch specifies the number of extracted ExtraResources in Multiple mode, extracts all if nil. MaxMatch *uint64 `json:"maxMatch,omitempty"` // MinMatch specifies the required minimum of extracted ExtraResources in Multiple mode. MinMatch *uint64 `json:"minMatch,omitempty"` // SortByFieldPath is the path to the field based on which list of ExtraResources is alphabetically sorted. // +kubebuilder:default="metadata.name" SortByFieldPath string `json:"sortByFieldPath,omitempty"` // MatchLabels ensures an object with matching labels is selected. MatchLabels []ResourceSourceSelectorLabelMatcher `json:"matchLabels,omitempty"` }
An ResourceSourceSelector selects an ExtraResource via labels.
func (*ResourceSourceSelector) DeepCopy ¶
func (in *ResourceSourceSelector) DeepCopy() *ResourceSourceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSourceSelector.
func (*ResourceSourceSelector) DeepCopyInto ¶
func (in *ResourceSourceSelector) DeepCopyInto(out *ResourceSourceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceSourceSelector) GetSortByFieldPath ¶
func (e *ResourceSourceSelector) GetSortByFieldPath() string
GetSortByFieldPath returns the sort by path if set or a sane default.
type ResourceSourceSelectorLabelMatcher ¶
type ResourceSourceSelectorLabelMatcher struct { // Type specifies where the value for a label comes from. // +optional // +kubebuilder:validation:Enum=FromCompositeFieldPath;Value // +kubebuilder:default=FromCompositeFieldPath Type ResourceSourceSelectorLabelMatcherType `json:"type,omitempty"` // Key of the label to match. Key string `json:"key"` // ValueFromFieldPath specifies the field path to look for the label value. ValueFromFieldPath *string `json:"valueFromFieldPath,omitempty"` // FromFieldPathPolicy specifies the policy for the valueFromFieldPath. // The default is Required, meaning that an error will be returned if the // field is not found in the composite resource. // Optional means that if the field is not found in the composite resource, // that label pair will just be skipped. N.B. other specified label // matchers will still be used to retrieve the desired // resource config, if any. // +kubebuilder:validation:Enum=Optional;Required // +kubebuilder:default=Required FromFieldPathPolicy *FromFieldPathPolicy `json:"fromFieldPathPolicy,omitempty"` // Value specifies a literal label value. Value *string `json:"value,omitempty"` }
An ResourceSourceSelectorLabelMatcher acts like a k8s label selector but can draw the label value from a different path.
func (*ResourceSourceSelectorLabelMatcher) DeepCopy ¶
func (in *ResourceSourceSelectorLabelMatcher) DeepCopy() *ResourceSourceSelectorLabelMatcher
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSourceSelectorLabelMatcher.
func (*ResourceSourceSelectorLabelMatcher) DeepCopyInto ¶
func (in *ResourceSourceSelectorLabelMatcher) DeepCopyInto(out *ResourceSourceSelectorLabelMatcher)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceSourceSelectorLabelMatcher) FromFieldPathIsOptional ¶
func (e *ResourceSourceSelectorLabelMatcher) FromFieldPathIsOptional() bool
FromFieldPathIsOptional returns true if the FromFieldPathPolicy is set to +optional
func (*ResourceSourceSelectorLabelMatcher) GetType ¶
func (e *ResourceSourceSelectorLabelMatcher) GetType() ResourceSourceSelectorLabelMatcherType
GetType returns the type of the label matcher, returning the default if not set.
type ResourceSourceSelectorLabelMatcherType ¶
type ResourceSourceSelectorLabelMatcherType string
ResourceSourceSelectorLabelMatcherType specifies where the value for a label comes from.
const ( // ResourceSourceSelectorLabelMatcherTypeFromCompositeFieldPath extracts // the label value from a composite fieldpath. ResourceSourceSelectorLabelMatcherTypeFromCompositeFieldPath ResourceSourceSelectorLabelMatcherType = "FromCompositeFieldPath" // ResourceSourceSelectorLabelMatcherTypeValue uses a literal as label // value. ResourceSourceSelectorLabelMatcherTypeValue ResourceSourceSelectorLabelMatcherType = "Value" )
type ResourceSourceType ¶
type ResourceSourceType string
ResourceSourceType specifies the way the ExtraResource is selected.
const ( // ResourceSourceTypeReference by name. ResourceSourceTypeReference ResourceSourceType = "Reference" // ResourceSourceTypeSelector by labels. ResourceSourceTypeSelector ResourceSourceType = "Selector" )