Documentation
¶
Overview ¶
Package v1beta1 contains the input type for this Function +kubebuilder:object:generate=true +groupName=environmentconfigs.fn.crossplane.io +versionName=v1beta1
Index ¶
- type EnvironmentSource
- type EnvironmentSourceReference
- type EnvironmentSourceSelector
- func (in *EnvironmentSourceSelector) DeepCopy() *EnvironmentSourceSelector
- func (in *EnvironmentSourceSelector) DeepCopyInto(out *EnvironmentSourceSelector)
- func (e *EnvironmentSourceSelector) GetMode() EnvironmentSourceSelectorModeType
- func (e *EnvironmentSourceSelector) GetSortByFieldPath() string
- type EnvironmentSourceSelectorLabelMatcher
- func (in *EnvironmentSourceSelectorLabelMatcher) DeepCopy() *EnvironmentSourceSelectorLabelMatcher
- func (in *EnvironmentSourceSelectorLabelMatcher) DeepCopyInto(out *EnvironmentSourceSelectorLabelMatcher)
- func (e *EnvironmentSourceSelectorLabelMatcher) FromFieldPathIsOptional() bool
- func (e *EnvironmentSourceSelectorLabelMatcher) GetType() EnvironmentSourceSelectorLabelMatcherType
- type EnvironmentSourceSelectorLabelMatcherType
- type EnvironmentSourceSelectorModeType
- type EnvironmentSourceType
- type FromFieldPathPolicy
- type Input
- type InputSpec
- type PatchPolicy
- type Policy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentSource ¶
type EnvironmentSource struct {
// Type specifies the way the EnvironmentConfig is selected.
// Default is `Reference`
// +optional
// +kubebuilder:validation:Enum=Reference;Selector
// +kubebuilder:default=Reference
Type EnvironmentSourceType `json:"type,omitempty"`
// Ref is a named reference to a single EnvironmentConfig.
// Either Ref or Selector is required.
// +optional
Ref *EnvironmentSourceReference `json:"ref,omitempty"`
// Selector selects EnvironmentConfig(s) via labels.
// +optional
Selector *EnvironmentSourceSelector `json:"selector,omitempty"`
}
EnvironmentSource selects a EnvironmentConfig resource.
func (*EnvironmentSource) DeepCopy ¶
func (in *EnvironmentSource) DeepCopy() *EnvironmentSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSource.
func (*EnvironmentSource) DeepCopyInto ¶
func (in *EnvironmentSource) DeepCopyInto(out *EnvironmentSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvironmentSource) GetType ¶
func (e *EnvironmentSource) GetType() EnvironmentSourceType
GetType returns the type of the environment source, returning the default if not set.
type EnvironmentSourceReference ¶
type EnvironmentSourceReference struct {
// The name of the object.
Name string `json:"name"`
}
An EnvironmentSourceReference references an EnvironmentConfig by it's name.
func (*EnvironmentSourceReference) DeepCopy ¶
func (in *EnvironmentSourceReference) DeepCopy() *EnvironmentSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSourceReference.
func (*EnvironmentSourceReference) DeepCopyInto ¶
func (in *EnvironmentSourceReference) DeepCopyInto(out *EnvironmentSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvironmentSourceSelector ¶
type EnvironmentSourceSelector struct {
// Mode specifies retrieval strategy: "Single" or "Multiple".
// +kubebuilder:validation:Enum=Single;Multiple
// +kubebuilder:default=Single
Mode EnvironmentSourceSelectorModeType `json:"mode,omitempty"`
// MaxMatch specifies the number of extracted EnvironmentConfigs in Multiple mode, extracts all if nil.
MaxMatch *uint64 `json:"maxMatch,omitempty"`
// MinMatch specifies the required minimum of extracted EnvironmentConfigs in Multiple mode.
MinMatch *uint64 `json:"minMatch,omitempty"`
// SortByFieldPath is the path to the field based on which list of EnvironmentConfigs is alphabetically sorted.
// +kubebuilder:default="metadata.name"
SortByFieldPath string `json:"sortByFieldPath,omitempty"`
// MatchLabels ensures an object with matching labels is selected.
MatchLabels []EnvironmentSourceSelectorLabelMatcher `json:"matchLabels,omitempty"`
}
An EnvironmentSourceSelector selects an EnvironmentConfig via labels.
func (*EnvironmentSourceSelector) DeepCopy ¶
func (in *EnvironmentSourceSelector) DeepCopy() *EnvironmentSourceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSourceSelector.
func (*EnvironmentSourceSelector) DeepCopyInto ¶
func (in *EnvironmentSourceSelector) DeepCopyInto(out *EnvironmentSourceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvironmentSourceSelector) GetMode ¶
func (e *EnvironmentSourceSelector) GetMode() EnvironmentSourceSelectorModeType
GetMode returns the mode of the EnvironmentSourceSelector, returning the default if not set.
func (*EnvironmentSourceSelector) GetSortByFieldPath ¶
func (e *EnvironmentSourceSelector) GetSortByFieldPath() string
GetSortByFieldPath returns the field path used to sort the EnvironmentConfigs, returning the default if not set.
type EnvironmentSourceSelectorLabelMatcher ¶
type EnvironmentSourceSelectorLabelMatcher struct {
// Type specifies where the value for a label comes from.
// +optional
// +kubebuilder:validation:Enum=FromCompositeFieldPath;Value
// +kubebuilder:default=FromCompositeFieldPath
Type EnvironmentSourceSelectorLabelMatcherType `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
// environment 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 EnvironmentSourceSelectorLabelMatcher acts like a k8s label selector but can draw the label value from a different path.
func (*EnvironmentSourceSelectorLabelMatcher) DeepCopy ¶
func (in *EnvironmentSourceSelectorLabelMatcher) DeepCopy() *EnvironmentSourceSelectorLabelMatcher
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSourceSelectorLabelMatcher.
func (*EnvironmentSourceSelectorLabelMatcher) DeepCopyInto ¶
func (in *EnvironmentSourceSelectorLabelMatcher) DeepCopyInto(out *EnvironmentSourceSelectorLabelMatcher)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvironmentSourceSelectorLabelMatcher) FromFieldPathIsOptional ¶
func (e *EnvironmentSourceSelectorLabelMatcher) FromFieldPathIsOptional() bool
FromFieldPathIsOptional returns true if the FromFieldPathPolicy is set to Optional.
func (*EnvironmentSourceSelectorLabelMatcher) GetType ¶
func (e *EnvironmentSourceSelectorLabelMatcher) GetType() EnvironmentSourceSelectorLabelMatcherType
GetType returns the type of the label matcher, returning the default if not set.
type EnvironmentSourceSelectorLabelMatcherType ¶
type EnvironmentSourceSelectorLabelMatcherType string
EnvironmentSourceSelectorLabelMatcherType specifies where the value for a label comes from.
const ( // EnvironmentSourceSelectorLabelMatcherTypeFromCompositeFieldPath extracts // the label value from a composite fieldpath. EnvironmentSourceSelectorLabelMatcherTypeFromCompositeFieldPath EnvironmentSourceSelectorLabelMatcherType = "FromCompositeFieldPath" // EnvironmentSourceSelectorLabelMatcherTypeValue uses a literal as label // value. EnvironmentSourceSelectorLabelMatcherTypeValue EnvironmentSourceSelectorLabelMatcherType = "Value" )
type EnvironmentSourceSelectorModeType ¶
type EnvironmentSourceSelectorModeType string
EnvironmentSourceSelectorModeType specifies amount of retrieved EnvironmentConfigs with matching label.
const ( // EnvironmentSourceSelectorSingleMode extracts only first EnvironmentConfig from the sorted list. EnvironmentSourceSelectorSingleMode EnvironmentSourceSelectorModeType = "Single" // EnvironmentSourceSelectorMultiMode extracts multiple EnvironmentConfigs from the sorted list. EnvironmentSourceSelectorMultiMode EnvironmentSourceSelectorModeType = "Multiple" )
type EnvironmentSourceType ¶
type EnvironmentSourceType string
EnvironmentSourceType specifies the way the EnvironmentConfig is selected.
const ( // EnvironmentSourceTypeReference by name. EnvironmentSourceTypeReference EnvironmentSourceType = "Reference" // EnvironmentSourceTypeSelector by labels. EnvironmentSourceTypeSelector EnvironmentSourceType = "Selector" )
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 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 {
// DefaultData statically defines the initial state of the environment.
// It has the same schema-less structure as the data field in
// environment configs.
// It is overwritten by the selected environment configs.
DefaultData map[string]extv1.JSON `json:"defaultData,omitempty"`
// EnvironmentConfigs selects a list of `EnvironmentConfig`s. The resolved
// resources are stored in the composite resource at
// `spec.environmentConfigRefs` and is only updated if it is null.
//
// The list of references is used to compute an in-memory environment at
// compose time. The data of all object is merged in the order they are
// listed, meaning the values of EnvironmentConfigs with a larger index take
// priority over ones with smaller indices.
//
// The computed environment can be accessed in a composition using
// `FromEnvironmentFieldPath` and `CombineFromEnvironment` patches.
// +optional
EnvironmentConfigs []EnvironmentSource `json:"environmentConfigs,omitempty"`
// Policy represents the Resolution policy which apply to all
// EnvironmentSourceReferences in EnvironmentConfigs list.
// +optional
Policy *Policy `json:"policy,omitempty"`
}
An InputSpec specifies the environment 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 ¶ added in v0.0.6
IsResolutionPolicyOptional checks whether the resolution policy of relevant reference is Optional.