v1beta1

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1beta1 contains API types that extend the Crossplane API. +kubebuilder:object:generate=true +groupName=apiextensions.crossplane.io +versionName=v1beta1

Index

Constants

View Source
const (
	// A TypeEstablished XRD has created the CRD for its composite resource and
	// started a controller to reconcile instances of said resource.
	TypeEstablished xpv1.ConditionType = "Established"

	// A TypeOffered XRD has created the CRD for its composite resource claim
	// and started a controller to reconcile instances of said claim.
	TypeOffered xpv1.ConditionType = "Offered"
)

Condition types.

View Source
const (
	ReasonWatchingComposite xpv1.ConditionReason = "WatchingCompositeResource"
	ReasonWatchingClaim     xpv1.ConditionReason = "WatchingCompositeResourceClaim"

	ReasonTerminatingComposite xpv1.ConditionReason = "TerminatingCompositeResource"
	ReasonTerminatingClaim     xpv1.ConditionReason = "TerminatingCompositeResourceClaim"
)

Reasons a resource is or is not established or offered.

View Source
const (
	Group   = "apiextensions.crossplane.io"
	Version = "v1beta1"
)

Package type metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds all registered types to scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	CompositeResourceDefinitionKind             = reflect.TypeOf(CompositeResourceDefinition{}).Name()
	CompositeResourceDefinitionGroupKind        = schema.GroupKind{Group: Group, Kind: CompositeResourceDefinitionKind}.String()
	CompositeResourceDefinitionKindAPIVersion   = CompositeResourceDefinitionKind + "." + SchemeGroupVersion.String()
	CompositeResourceDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(CompositeResourceDefinitionKind)
)

InCompositeResourceDefinition type metadata.

View Source
var (
	CompositionKind             = reflect.TypeOf(Composition{}).Name()
	CompositionGroupKind        = schema.GroupKind{Group: Group, Kind: CompositionKind}.String()
	CompositionKindAPIVersion   = CompositionKind + "." + SchemeGroupVersion.String()
	CompositionGroupVersionKind = SchemeGroupVersion.WithKind(CompositionKind)
)

Composition type metadata.

Functions

func TerminatingClaim

func TerminatingClaim() xpv1.Condition

TerminatingClaim indicates that Crossplane is terminating the controller and removing the definition of a composite resource claim.

func TerminatingComposite

func TerminatingComposite() xpv1.Condition

TerminatingComposite indicates that Crossplane is terminating the controller for and removing the definition of a composite resource.

func WatchingClaim

func WatchingClaim() xpv1.Condition

WatchingClaim indicates that Crossplane has defined and is watching for a new kind of composite resource claim.

func WatchingComposite

func WatchingComposite() xpv1.Condition

WatchingComposite indicates that Crossplane has defined and is watching for a new kind of composite resource.

Types

type ComposedTemplate

type ComposedTemplate struct {
	// A Name uniquely identifies this entry within its Composition's resources
	// array. Names are optional but *strongly* recommended. When all entries in
	// the resources array are named entries may added, deleted, and reordered
	// as long as their names do not change. When entries are not named the
	// length and order of the resources array should be treated as immutable.
	// Either all or no entries must be named.
	// +optional
	Name *string `json:"name,omitempty"`

	// Base is the target resource that the patches will be applied on.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:EmbeddedResource
	Base runtime.RawExtension `json:"base"`

	// Patches will be applied as overlay to the base resource.
	// +optional
	Patches []Patch `json:"patches,omitempty"`

	// ConnectionDetails lists the propagation secret keys from this target
	// 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
	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 CompositeResourceDefinition

type CompositeResourceDefinition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CompositeResourceDefinitionSpec   `json:"spec,omitempty"`
	Status CompositeResourceDefinitionStatus `json:"status,omitempty"`
}

An CompositeResourceDefinition defines a new kind of composite infrastructure resource. The new resource is composed of other composite or managed infrastructure resources. +kubebuilder:printcolumn:name="ESTABLISHED",type="string",JSONPath=".status.conditions[?(@.type=='Established')].status" +kubebuilder:printcolumn:name="OFFERED",type="string",JSONPath=".status.conditions[?(@.type=='Offered')].status" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=crossplane,shortName=xrd

func (*CompositeResourceDefinition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinition.

func (*CompositeResourceDefinition) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CompositeResourceDefinition) DeepCopyObject

func (in *CompositeResourceDefinition) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (CompositeResourceDefinition) GetClaimGroupVersionKind

func (in CompositeResourceDefinition) GetClaimGroupVersionKind() schema.GroupVersionKind

GetClaimGroupVersionKind returns the schema.GroupVersionKind of the CRD for the composite resource claim this CompositeResourceDefinition defines. An empty GroupVersionKind is returned if the CompositeResourceDefinition does not offer a claim.

func (CompositeResourceDefinition) GetCompositeGroupVersionKind

func (in CompositeResourceDefinition) GetCompositeGroupVersionKind() schema.GroupVersionKind

GetCompositeGroupVersionKind returns the schema.GroupVersionKind of the CRD for the composite resource this CompositeResourceDefinition defines.

func (*CompositeResourceDefinition) GetConnectionSecretKeys

func (in *CompositeResourceDefinition) GetConnectionSecretKeys() []string

GetConnectionSecretKeys returns the set of allowed keys to filter the connection secret.

func (CompositeResourceDefinition) OffersClaim

func (in CompositeResourceDefinition) OffersClaim() bool

OffersClaim is true when a CompositeResourceDefinition offers a claim for the composite resource it defines.

type CompositeResourceDefinitionControllerStatus

type CompositeResourceDefinitionControllerStatus struct {
	// The CompositeResourceTypeRef is the type of composite resource that
	// Crossplane is currently reconciling for this definition. Its version will
	// eventually become consistent with the definition's referenceable version.
	// Note that clients may interact with any served type; this is simply the
	// type that Crossplane interacts with.
	CompositeResourceTypeRef TypeReference `json:"compositeResourceType,omitempty"`

	// The CompositeResourceClaimTypeRef is the type of composite resource claim
	// that Crossplane is currently reconciling for this definition. Its version
	// will eventually become consistent with the definition's referenceable
	// version. Note that clients may interact with any served type; this is
	// simply the type that Crossplane interacts with.
	CompositeResourceClaimTypeRef TypeReference `json:"compositeResourceClaimType,omitempty"`
}

CompositeResourceDefinitionControllerStatus shows the observed state of the controllers that power the definition.

func (*CompositeResourceDefinitionControllerStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinitionControllerStatus.

func (*CompositeResourceDefinitionControllerStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompositeResourceDefinitionList

type CompositeResourceDefinitionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CompositeResourceDefinition `json:"items"`
}

CompositeResourceDefinitionList contains a list of CompositeResourceDefinitions.

func (*CompositeResourceDefinitionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinitionList.

func (*CompositeResourceDefinitionList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CompositeResourceDefinitionList) DeepCopyObject

func (in *CompositeResourceDefinitionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CompositeResourceDefinitionSpec

type CompositeResourceDefinitionSpec struct {
	// Group specifies the API group of the defined composite resource.
	// Composite resources are served under `/apis/<group>/...`. Must match the
	// name of the XRD (in the form `<names.plural>.<group>`).
	Group string `json:"group"`

	// Names specifies the resource and kind names of the defined composite
	// resource.
	Names extv1.CustomResourceDefinitionNames `json:"names"`

	// ClaimNames specifies the names of an optional composite resource claim.
	// When claim names are specified Crossplane will create a namespaced
	// 'composite resource claim' CRD that corresponds to the defined composite
	// resource. This composite resource claim acts as a namespaced proxy for
	// the composite resource; creating, updating, or deleting the claim will
	// create, update, or delete a corresponding composite resource. You may add
	// claim names to an existing CompositeResourceDefinition, but they cannot
	// be changed or removed once they have been set.
	// +optional
	ClaimNames *extv1.CustomResourceDefinitionNames `json:"claimNames,omitempty"`

	// ConnectionSecretKeys is the list of keys that will be exposed to the end
	// user of the defined kind.
	// +optional
	ConnectionSecretKeys []string `json:"connectionSecretKeys,omitempty"`

	// DefaultCompositionRef refers to the Composition resource that will be used
	// in case no composition selector is given.
	// +optional
	DefaultCompositionRef *xpv1.Reference `json:"defaultCompositionRef,omitempty"`

	// EnforcedCompositionRef refers to the Composition resource that will be used
	// by all composite instances whose schema is defined by this definition.
	// +optional
	// +immutable
	EnforcedCompositionRef *xpv1.Reference `json:"enforcedCompositionRef,omitempty"`

	// Versions is the list of all API versions of the defined composite
	// resource. Version names are used to compute the order in which served
	// versions are listed in API discovery. If the version string is
	// "kube-like", it will sort above non "kube-like" version strings, which
	// are ordered lexicographically. "Kube-like" versions start with a "v",
	// then are followed by a number (the major version), then optionally the
	// string "alpha" or "beta" and another number (the minor version). These
	// are sorted first by GA > beta > alpha (where GA is a version with no
	// suffix such as beta or alpha), and then by comparing major version, then
	// minor version. An example sorted list of versions: v10, v2, v1, v11beta2,
	// v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. Note that all
	// versions must have identical schemas; Crossplane does not currently
	// support conversion between different version schemas.
	Versions []CompositeResourceDefinitionVersion `json:"versions"`
}

CompositeResourceDefinitionSpec specifies the desired state of the definition.

func (*CompositeResourceDefinitionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinitionSpec.

func (*CompositeResourceDefinitionSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompositeResourceDefinitionStatus

type CompositeResourceDefinitionStatus struct {
	xpv1.ConditionedStatus `json:",inline"`

	// Controllers represents the status of the controllers that power this
	// composite resource definition.
	Controllers CompositeResourceDefinitionControllerStatus `json:"controllers,omitempty"`
}

CompositeResourceDefinitionStatus shows the observed state of the definition.

func (*CompositeResourceDefinitionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinitionStatus.

func (*CompositeResourceDefinitionStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompositeResourceDefinitionVersion

type CompositeResourceDefinitionVersion struct {
	// Name of this version, e.g. “v1”, “v2beta1”, etc. Composite resources are
	// served under this version at `/apis/<group>/<version>/...` if `served` is
	// true.
	Name string `json:"name"`

	// Referenceable specifies that this version may be referenced by a
	// Composition in order to configure which resources an XR may be composed
	// of. Exactly one version must be marked as referenceable; all Compositions
	// must target only the referenceable version. The referenceable version
	// must be served.
	Referenceable bool `json:"referenceable"`

	// Served specifies that this version should be served via REST APIs.
	Served bool `json:"served"`

	// Schema describes the schema used for validation, pruning, and defaulting
	// of this version of the defined composite resource. Fields required by all
	// composite resources will be injected into this schema automatically, and
	// will override equivalently named fields in this schema. Omitting this
	// schema results in a schema that contains only the fields required by all
	// composite resources.
	// +optional
	Schema *CompositeResourceValidation `json:"schema,omitempty"`

	// AdditionalPrinterColumns specifies additional columns returned in Table
	// output. If no columns are specified, a single column displaying the age
	// of the custom resource is used. See the following link for details:
	// https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables
	// +optional
	AdditionalPrinterColumns []extv1.CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty"`
}

CompositeResourceDefinitionVersion describes a version of an XR.

func (*CompositeResourceDefinitionVersion) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceDefinitionVersion.

func (*CompositeResourceDefinitionVersion) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompositeResourceValidation

type CompositeResourceValidation struct {
	// OpenAPIV3Schema is the OpenAPI v3 schema to use for validation and
	// pruning.
	// +kubebuilder:pruning:PreserveUnknownFields
	OpenAPIV3Schema runtime.RawExtension `json:"openAPIV3Schema,omitempty"`
}

CompositeResourceValidation is a list of validation methods for a composite resource.

func (*CompositeResourceValidation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeResourceValidation.

func (*CompositeResourceValidation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Composition

type Composition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CompositionSpec   `json:"spec,omitempty"`
	Status CompositionStatus `json:"status,omitempty"`
}

Composition defines the group of resources to be created when a compatible type is created with reference to the composition. +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=crossplane

func (*Composition) DeepCopy

func (in *Composition) DeepCopy() *Composition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Composition.

func (*Composition) DeepCopyInto

func (in *Composition) DeepCopyInto(out *Composition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Composition) DeepCopyObject

func (in *Composition) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CompositionList

type CompositionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Composition `json:"items"`
}

CompositionList contains a list of Compositions.

func (*CompositionList) DeepCopy

func (in *CompositionList) DeepCopy() *CompositionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionList.

func (*CompositionList) DeepCopyInto

func (in *CompositionList) DeepCopyInto(out *CompositionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CompositionList) DeepCopyObject

func (in *CompositionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CompositionSpec

type CompositionSpec struct {
	// CompositeTypeRef specifies the type of composite resource that this
	// composition is compatible with.
	// +immutable
	CompositeTypeRef TypeReference `json:"compositeTypeRef"`

	// PatchSets define a named set of patches that may be included by
	// any resource in this Composition.
	// PatchSets cannot themselves refer to other PatchSets.
	// +optional
	PatchSets []PatchSet `json:"patchSets,omitempty"`

	// Resources is the list of resource templates that will be used when a
	// composite resource referring to this composition is created.
	Resources []ComposedTemplate `json:"resources"`

	// WriteConnectionSecretsToNamespace specifies the namespace in which the
	// connection secrets of composite resource dynamically provisioned using
	// this composition will be created.
	// +optional
	WriteConnectionSecretsToNamespace *string `json:"writeConnectionSecretsToNamespace,omitempty"`
}

CompositionSpec specifies the desired state of the definition.

func (*CompositionSpec) DeepCopy

func (in *CompositionSpec) DeepCopy() *CompositionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionSpec.

func (*CompositionSpec) DeepCopyInto

func (in *CompositionSpec) DeepCopyInto(out *CompositionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompositionStatus

type CompositionStatus struct {
	xpv1.ConditionedStatus `json:",inline"`
}

CompositionStatus shows the observed state of the composition.

func (*CompositionStatus) DeepCopy

func (in *CompositionStatus) DeepCopy() *CompositionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionStatus.

func (*CompositionStatus) DeepCopyInto

func (in *CompositionStatus) DeepCopyInto(out *CompositionStatus)

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 composition instance. Leave empty if you'd like
	// to use the same key name.
	// +optional
	Name *string `json:"name,omitempty"`

	// Type sets the connection detail fetching behaviour to be used. Each
	// connection detail type may require its own fields to be set on the
	// ConnectionDetail object. If the type is omitted Crossplane will attempt
	// to infer it based on which other fields were specified.
	// +optional
	// +kubebuilder:validation:Enum=FromConnectionSecretKey;FromFieldPath;FromValue
	Type ConnectionDetailType `json:"type,omitempty"`

	// FromConnectionSecretKey is the key that will be used to fetch the value
	// from the given target resource's 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 is specified.
	// +optional
	FromFieldPath *string `json:"fromFieldPath,omitempty"`

	// Value that will be propagated to the connection secret of the composition
	// instance. Typically you should use FromConnectionSecretKey instead, but
	// an explicit value may be set to inject a fixed, non-sensitive connection
	// secret values, for example a well-known port. Supercedes
	// FromConnectionSecretKey when set.
	// +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 added in v1.1.0

type ConnectionDetailType string

A ConnectionDetailType is a type of connection detail.

const (
	ConnectionDetailTypeUnknown                 ConnectionDetailType = "Unknown"
	ConnectionDetailTypeFromConnectionSecretKey ConnectionDetailType = "FromConnectionSecretKey" // Default
	ConnectionDetailTypeFromFieldPath           ConnectionDetailType = "FromFieldPath"
	ConnectionDetailTypeFromValue               ConnectionDetailType = "FromValue"
)

ConnectionDetailType types.

type ConvertTransform added in v1.0.0

type ConvertTransform struct {
	// ToType is the type of the output of this transform.
	// +kubebuilder:validation:Enum=string;int;bool;float64
	ToType string `json:"toType"`
}

A ConvertTransform converts the input into a new object whose type is supplied.

func (*ConvertTransform) DeepCopy added in v1.0.0

func (in *ConvertTransform) DeepCopy() *ConvertTransform

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConvertTransform.

func (*ConvertTransform) DeepCopyInto added in v1.0.0

func (in *ConvertTransform) DeepCopyInto(out *ConvertTransform)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FromFieldPathPolicy added in v1.1.0

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]string `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.

type MathTransform

type MathTransform struct {
	// Multiply the value.
	// +optional
	Multiply *int64 `json:"multiply,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 Patch

type Patch 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;PatchSet;ToCompositeFieldPath
	// +kubebuilder:default=FromCompositeFieldPath
	Type PatchType `json:"type,omitempty"`

	// 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"`

	// 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"`

	// PatchSetName to include patches from. Required when type is PatchSet.
	// +optional
	PatchSetName *string `json:"patchSetName,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 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 (*Patch) DeepCopy

func (in *Patch) DeepCopy() *Patch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.

func (*Patch) DeepCopyInto

func (in *Patch) DeepCopyInto(out *Patch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PatchPolicy added in v1.1.0

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"`
}

A PatchPolicy configures the specifics of patching behaviour.

func (*PatchPolicy) DeepCopy added in v1.1.0

func (in *PatchPolicy) DeepCopy() *PatchPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchPolicy.

func (*PatchPolicy) DeepCopyInto added in v1.1.0

func (in *PatchPolicy) DeepCopyInto(out *PatchPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PatchSet added in v1.0.0

type PatchSet struct {
	// Name of this PatchSet.
	Name string `json:"name"`

	// Patches will be applied as an overlay to the base resource.
	Patches []Patch `json:"patches"`
}

A PatchSet is a set of patches that can be reused from all resources within a Composition.

func (*PatchSet) DeepCopy added in v1.0.0

func (in *PatchSet) DeepCopy() *PatchSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchSet.

func (*PatchSet) DeepCopyInto added in v1.0.0

func (in *PatchSet) DeepCopyInto(out *PatchSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PatchType added in v1.0.0

type PatchType string

A PatchType is a type of patch.

const (
	PatchTypeFromCompositeFieldPath PatchType = "FromCompositeFieldPath" // Default
	PatchTypePatchSet               PatchType = "PatchSet"
	PatchTypeToCompositeFieldPath   PatchType = "ToCompositeFieldPath"
)

Patch types.

type ReadinessCheck

type ReadinessCheck struct {
	// Type indicates the type of probe you'd like to use.
	// +kubebuilder:validation:Enum="MatchString";"MatchInteger";"NonEmpty";"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"`
}

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 added in v1.1.0

type ReadinessCheckType string

ReadinessCheckType is used for readiness check types.

const (
	ReadinessCheckTypeNonEmpty     ReadinessCheckType = "NonEmpty"
	ReadinessCheckTypeMatchString  ReadinessCheckType = "MatchString"
	ReadinessCheckTypeMatchInteger ReadinessCheckType = "MatchInteger"
	ReadinessCheckTypeNone         ReadinessCheckType = "None"
)

The possible values for readiness check type.

type StringTransform

type StringTransform struct {
	// Format the input using a Go format string. See
	// https://golang.org/pkg/fmt/ for details.
	Format string `json:"fmt"`
}

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 Transform

type Transform struct {

	// Type of the transform to be run.
	// +kubebuilder:validation:Enum=map;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"`

	// 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

func (in *Transform) DeepCopy() *Transform

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Transform.

func (*Transform) DeepCopyInto

func (in *Transform) DeepCopyInto(out *Transform)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TransformType

type TransformType string

TransformType is type of the transform function to be chosen.

const (
	TransformTypeMap     TransformType = "map"
	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.

Jump to

Keyboard shortcuts

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