Documentation ¶
Overview ¶
Package v1alpha1 contains core API types used by most Crossplane resources. +kubebuilder:object:generate=true +groupName=core.crossplane.io +versionName=v1alpha1
Index ¶
- Constants
- type BindingPhase
- type BindingStatus
- type ClassSpecTemplate
- type Condition
- func Available() Condition
- func Creating() Condition
- func Deleting() Condition
- func ReconcileError(err error) Condition
- func ReconcileSuccess() Condition
- func ReferenceResolutionBlocked(err error) Condition
- func ReferenceResolutionSuccess() Condition
- func SecretPropagationError(err error) Condition
- func SecretPropagationSuccess() Condition
- func Unavailable() Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition
- func (s *ConditionedStatus) SetConditions(c ...Condition)
- type LocalSecretReference
- type ProviderSpec
- type ReclaimPolicy
- type ResourceClaimSpec
- type ResourceClaimStatus
- type ResourceSpec
- type ResourceStatus
- type SecretKeySelector
- type SecretReference
- type TargetSpec
- type TargetStatus
Constants ¶
const ( AnnotationDefaultClassKey = "resourceclass.crossplane.io/is-default-class" AnnotationDefaultClassValue = "true" )
The annotation used to make a resource class the default.
const ( // ResourceCredentialsSecretEndpointKey is the key inside a connection secret for the connection endpoint ResourceCredentialsSecretEndpointKey = "endpoint" // ResourceCredentialsSecretPortKey is the key inside a connection secret for the connection port ResourceCredentialsSecretPortKey = "port" // ResourceCredentialsSecretUserKey is the key inside a connection secret for the connection user ResourceCredentialsSecretUserKey = "username" // ResourceCredentialsSecretPasswordKey is the key inside a connection secret for the connection password ResourceCredentialsSecretPasswordKey = "password" // ResourceCredentialsSecretCAKey is the key inside a connection secret for the server CA certificate ResourceCredentialsSecretCAKey = "clusterCA" // ResourceCredentialsSecretClientCertKey is the key inside a connection secret for the client certificate ResourceCredentialsSecretClientCertKey = "clientCert" // ResourceCredentialsSecretClientKeyKey is the key inside a connection secret for the client key ResourceCredentialsSecretClientKeyKey = "clientKey" // ResourceCredentialsSecretTokenKey is the key inside a connection secret for the bearer token value ResourceCredentialsSecretTokenKey = "token" // ResourceCredentialsSecretKubeconfigKey is the key inside a connection secret for the raw kubeconfig yaml ResourceCredentialsSecretKubeconfigKey = "kubeconfig" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingPhase ¶
type BindingPhase string
BindingPhase represents the current binding phase of a resource or claim.
const ( // BindingPhaseUnset resources cannot be bound to another resource because // they are in an unset binding phase, presumed to be functionally // equivalent to BindingPhaseUnbindable. BindingPhaseUnset BindingPhase = "" // BindingPhaseUnbindable resources cannot be bound to another resource, for // example because they are currently unavailable, or being created. BindingPhaseUnbindable BindingPhase = "Unbindable" // BindingPhaseUnbound resources are available for binding to another // resource. BindingPhaseUnbound BindingPhase = "Unbound" // BindingPhaseBound resources are bound to another resource. BindingPhaseBound BindingPhase = "Bound" // BindingPhaseReleased managed resources were bound to a resource claim // that has since been deleted. Released managed resources cannot be // reclaimed; they are retained to allow manual clean-up and deletion. BindingPhaseReleased BindingPhase = "Released" )
Binding phases.
type BindingStatus ¶
type BindingStatus struct { // Phase represents the binding phase of a managed resource or claim. // Unbindable resources cannot be bound, typically because they are // currently unavailable, or still being created. Unbound resource are // available for binding, and Bound resources have successfully bound to // another resource. // +optional // +kubebuilder:validation:Enum=Unbindable;Unbound;Bound;Released Phase BindingPhase `json:"bindingPhase,omitempty"` }
A BindingStatus represents the bindability and binding status of a resource.
func (*BindingStatus) DeepCopy ¶
func (in *BindingStatus) DeepCopy() *BindingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingStatus.
func (*BindingStatus) DeepCopyInto ¶
func (in *BindingStatus) DeepCopyInto(out *BindingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BindingStatus) GetBindingPhase ¶
func (s *BindingStatus) GetBindingPhase() BindingPhase
GetBindingPhase gets the binding phase of the resource.
func (*BindingStatus) SetBindingPhase ¶
func (s *BindingStatus) SetBindingPhase(p BindingPhase)
SetBindingPhase sets the binding phase of the resource.
type ClassSpecTemplate ¶
type ClassSpecTemplate struct { // WriteConnectionSecretsToNamespace specifies the namespace in which the // connection secrets of managed resources dynamically provisioned using // this claim will be created. WriteConnectionSecretsToNamespace string `json:"writeConnectionSecretsToNamespace"` // ProviderReference specifies the provider that will be used to create, // observe, update, and delete managed resources that are dynamically // provisioned using this resource class. ProviderReference *corev1.ObjectReference `json:"providerRef"` // ReclaimPolicy specifies what will happen to managed resources dynamically // provisioned using this class when their resource claims are deleted, and // what will happen to their underlying external resource when they are // deleted. The "Delete" policy causes the managed resource to be deleted // when its bound resource claim is deleted, and in turn causes the external // resource to be deleted when its managed resource is deleted. The "Retain" // policy causes the managed resource to be retained, in binding phase // "Released", when its resource claim is deleted, and in turn causes the // external resource to be retained when its managed resource is deleted. // The "Retain" policy is used when no policy is specified, however the // "Delete" policy is set at dynamic provisioning time if no policy is set. // +optional // +kubebuilder:validation:Enum=Retain;Delete ReclaimPolicy ReclaimPolicy `json:"reclaimPolicy,omitempty"` }
A ClassSpecTemplate defines a template that will be used to create the specifications of managed resources dynamically provisioned using a resource class.
func (*ClassSpecTemplate) DeepCopy ¶
func (in *ClassSpecTemplate) DeepCopy() *ClassSpecTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClassSpecTemplate.
func (*ClassSpecTemplate) DeepCopyInto ¶
func (in *ClassSpecTemplate) DeepCopyInto(out *ClassSpecTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct { // Type of this condition. At most one of each condition type may apply to // a resource at any point in time. Type ConditionType `json:"type"` // Status of this condition; is it currently True, False, or Unknown? Status corev1.ConditionStatus `json:"status"` // LastTransitionTime is the last time this condition transitioned from one // status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime"` // A Reason for this condition's last transition from one status to another. Reason ConditionReason `json:"reason"` // A Message containing details about this condition's last transition from // one status to another, if any. // +optional Message string `json:"message,omitempty"` }
A Condition that may apply to a resource.
func Available ¶
func Available() Condition
Available returns a condition that indicates the resource is currently observed to be available for use.
func Creating ¶
func Creating() Condition
Creating returns a condition that indicates the resource is currently being created.
func Deleting ¶
func Deleting() Condition
Deleting returns a condition that indicates the resource is currently being deleted.
func ReconcileError ¶
ReconcileError returns a condition indicating that Crossplane encountered an error while reconciling the resource. This could mean Crossplane was unable to update the resource to reflect its desired state, or that Crossplane was unable to determine the current actual state of the resource.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition indicating that Crossplane successfully completed the most recent reconciliation of the resource.
func ReferenceResolutionBlocked ¶
ReferenceResolutionBlocked returns a condition indicating that Crossplane is unable to resolve the references used in the resource. This could mean that one or more of referred resources do not yet exist, or are not yet Ready.
func ReferenceResolutionSuccess ¶
func ReferenceResolutionSuccess() Condition
ReferenceResolutionSuccess returns a condition indicating that Crossplane successfully resolved the references used in the resource.
func SecretPropagationError ¶ added in v0.4.0
SecretPropagationError returns a condition indicating that Crossplane was unable to propagate connection data to the referenced secret. This could be because it was unable to find the managed resource that owns the secret to be propagated.
func SecretPropagationSuccess ¶ added in v0.4.0
func SecretPropagationSuccess() Condition
SecretPropagationSuccess returns a condition indicating that Crossplane successfully propagated connection data to the referenced secret.
func Unavailable ¶
func Unavailable() Condition
Unavailable returns a condition that indicates the resource is not currently available for use. Unavailable should be set only when Crossplane expects the resource to be available but knows it is not, for example because its API reports it is unhealthy.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
WithMessage returns a condition by adding the provided message to existing condition.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ReasonAvailable ConditionReason = "Resource is available for use" ReasonCreating ConditionReason = "Resource is being created" ReasonDeleting ConditionReason = "Resource is being deleted" )
Reasons a resource is or is not ready.
const ( ReasonReconcileSuccess ConditionReason = "Successfully reconciled resource" ReasonReconcileError ConditionReason = "Encountered an error during resource reconciliation" )
Reasons a resource is or is not synced.
const ( ReasonReferenceResolveSuccess ConditionReason = "Successfully resolved resource references to other resources" ReasonResolveReferencesBlocked ConditionReason = "One or more referenced resources do not exist, or are not yet Ready" )
Reason references for a resource are or are not resolved.
const ( ReasonSecretPropagationSuccess ConditionReason = "Successfully propagated connection data to referenced secret" ReasonSecretPropagationError ConditionReason = "Unable to propagate connection data to referenced secret" )
Reason a referenced secret has or has not been propagated to.
type ConditionType ¶
type ConditionType string
A ConditionType represents a condition a resource could be in.
const ( // TypeReady resources are believed to be ready to handle work. TypeReady ConditionType = "Ready" // TypeSynced resources are believed to be in sync with the // Kubernetes resources that manage their lifecycle. TypeSynced ConditionType = "Synced" // TypeReferencesResolved resources' references are resolved TypeReferencesResolved ConditionType = "ReferencesResolved" // TypeSecretPropagated resources have had connection information // propagated to their secret reference. TypeSecretPropagated ConditionType = "ConnectionSecretPropagated" )
Condition types.
type ConditionedStatus ¶
type ConditionedStatus struct { // Conditions of the resource. // +optional Conditions []Condition `json:"conditions,omitempty"` }
A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) DeepCopy ¶
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (*ConditionedStatus) DeepCopyInto ¶
func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConditionedStatus) Equal ¶
func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.
func (*ConditionedStatus) GetCondition ¶
func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition
GetCondition returns the condition for the given ConditionType if exists, otherwise returns nil
func (*ConditionedStatus) SetConditions ¶
func (s *ConditionedStatus) SetConditions(c ...Condition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.
type LocalSecretReference ¶
type LocalSecretReference struct { // Name of the secret. Name string `json:"name"` }
A LocalSecretReference is a reference to a secret in the same namespace as the referencer.
func (*LocalSecretReference) DeepCopy ¶
func (in *LocalSecretReference) DeepCopy() *LocalSecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference.
func (*LocalSecretReference) DeepCopyInto ¶
func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProviderSpec ¶ added in v0.3.0
type ProviderSpec struct { // CredentialsSecretRef references a specific secret's key that contains // the credentials that are used to connect to the provider. // +optional CredentialsSecretRef *SecretKeySelector `json:"credentialsSecretRef,omitempty"` }
A ProviderSpec defines the common way to get to the necessary objects to connect to the provider.
func (*ProviderSpec) DeepCopy ¶ added in v0.3.0
func (in *ProviderSpec) DeepCopy() *ProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec.
func (*ProviderSpec) DeepCopyInto ¶ added in v0.3.0
func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReclaimPolicy ¶
type ReclaimPolicy string
A ReclaimPolicy determines what should happen to managed resources when their bound resource claims are deleted.
const ( // ReclaimDelete means both the managed resource and its underlying external // resource will be deleted when its bound resource claim is deleted. ReclaimDelete ReclaimPolicy = "Delete" // ReclaimRetain means the managed resource will retained when its bound // resource claim is deleted. Furthermore, its underlying external resource // will be retained when the managed resource is deleted. ReclaimRetain ReclaimPolicy = "Retain" )
type ResourceClaimSpec ¶
type ResourceClaimSpec struct { // WriteConnectionSecretToReference specifies the name of a Secret, in the // same namespace as this resource claim, to which any connection details // for this resource claim should be written. Connection details frequently // include the endpoint, username, and password required to connect to the // managed resource bound to this resource claim. // +optional WriteConnectionSecretToReference *LocalSecretReference `json:"writeConnectionSecretToRef,omitempty"` // A ClassSelector specifies labels that will be used to select a resource // class for this claim. If multiple classes match the labels one will be // chosen at random. // +optional ClassSelector *v1.LabelSelector `json:"classSelector,omitempty"` // A ClassReference specifies a resource class that will be used to // dynamically provision a managed resource when the resource claim is // created. // +optional ClassReference *corev1.ObjectReference `json:"classRef,omitempty"` // A ResourceReference specifies an existing managed resource, in any // namespace, to which this resource claim should attempt to bind. Omit the // resource reference to enable dynamic provisioning using a resource class; // the resource reference will be automatically populated by Crossplane. // +optional ResourceReference *corev1.ObjectReference `json:"resourceRef,omitempty"` }
A ResourceClaimSpec defines the desired state of a resource claim.
func (*ResourceClaimSpec) DeepCopy ¶
func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.
func (*ResourceClaimSpec) DeepCopyInto ¶
func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceClaimStatus ¶
type ResourceClaimStatus struct { ConditionedStatus `json:",inline"` BindingStatus `json:",inline"` }
A ResourceClaimStatus represents the observed status of a resource claim.
func (*ResourceClaimStatus) DeepCopy ¶
func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.
func (*ResourceClaimStatus) DeepCopyInto ¶
func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { // WriteConnectionSecretToReference specifies the namespace and name of a // Secret to which any connection details for this managed resource should // be written. Connection details frequently include the endpoint, username, // and password required to connect to the managed resource. // +optional WriteConnectionSecretToReference *SecretReference `json:"writeConnectionSecretToRef,omitempty"` // ClaimReference specifies the resource claim to which this managed // resource will be bound. ClaimReference is set automatically during // dynamic provisioning. Crossplane does not currently support setting this // field manually, per https://github.com/crossplaneio/crossplane-runtime/issues/19 // +optional ClaimReference *corev1.ObjectReference `json:"claimRef,omitempty"` // ClassReference specifies the resource class that was used to dynamically // provision this managed resource, if any. Crossplane does not currently // support setting this field manually, per // https://github.com/crossplaneio/crossplane-runtime/issues/20 // +optional ClassReference *corev1.ObjectReference `json:"classRef,omitempty"` // ProviderReference specifies the provider that will be used to create, // observe, update, and delete this managed resource. ProviderReference *corev1.ObjectReference `json:"providerRef"` // ReclaimPolicy specifies what will happen to this managed resource when // its resource claim is deleted, and what will happen to the underlying // external resource when the managed resource is deleted. The "Delete" // policy causes the managed resource to be deleted when its bound resource // claim is deleted, and in turn causes the external resource to be deleted // when its managed resource is deleted. The "Retain" policy causes the // managed resource to be retained, in binding phase "Released", when its // resource claim is deleted, and in turn causes the external resource to be // retained when its managed resource is deleted. The "Retain" policy is // used when no policy is specified. // +optional // +kubebuilder:validation:Enum=Retain;Delete ReclaimPolicy ReclaimPolicy `json:"reclaimPolicy,omitempty"` }
A ResourceSpec defines the desired state of a managed resource.
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct { ConditionedStatus `json:",inline"` BindingStatus `json:",inline"` }
ResourceStatus represents the observed state of a managed resource.
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶
type SecretKeySelector struct { SecretReference `json:",inline"` // The key to select. Key string `json:"key"` }
A SecretKeySelector is a reference to a secret key in an arbitrary namespace.
func (*SecretKeySelector) DeepCopy ¶
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretReference ¶
type SecretReference struct { // Name of the secret. Name string `json:"name"` // Namespace of the secret. Namespace string `json:"namespace"` }
A SecretReference is a reference to a secret in an arbitrary namespace.
func (*SecretReference) DeepCopy ¶
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetSpec ¶ added in v0.4.0
type TargetSpec struct { // WriteConnectionSecretToReference specifies the name of a Secret, in the // same namespace as this target, to which any connection details for this // target should be written or already exist. Connection secrets referenced // by a target should contain information for connecting to a resource that // allows for scheduling of workloads. // +optional WriteConnectionSecretToReference *LocalSecretReference `json:"connectionSecretRef,omitempty"` // A ResourceReference specifies an existing managed resource, in any // namespace, which this target should attempt to propagate a connection // secret from. // +optional ResourceReference *corev1.ObjectReference `json:"clusterRef,omitempty"` }
A TargetSpec defines the common fields of objects used for exposing infrastructure to workloads that can be scheduled to.
func (*TargetSpec) DeepCopy ¶ added in v0.4.0
func (in *TargetSpec) DeepCopy() *TargetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec.
func (*TargetSpec) DeepCopyInto ¶ added in v0.4.0
func (in *TargetSpec) DeepCopyInto(out *TargetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetStatus ¶ added in v0.4.0
type TargetStatus struct {
ConditionedStatus `json:",inline"`
}
A TargetStatus defines the observed status a target.
func (*TargetStatus) DeepCopy ¶ added in v0.4.0
func (in *TargetStatus) DeepCopy() *TargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus.
func (*TargetStatus) DeepCopyInto ¶ added in v0.4.0
func (in *TargetStatus) DeepCopyInto(out *TargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.