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
- 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 ReclaimPolicy
- type ResourceClaimSpec
- type ResourceClaimStatus
- type ResourceSpec
- type ResourceStatus
- type SecretKeySelector
- type SecretReference
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" // ResourceCredentialsTokenKey is the key inside a connection secret for the bearer token value ResourceCredentialsTokenKey = "token" )
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" )
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 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 external resources when // managed resources dynamically provisioned using this resource class are // deleted. "Delete" deletes the external resource, while "Retain" (the // default) does not. Note this behaviour is subtly different from other // uses of the ReclaimPolicy concept within the Kubernetes ecosystem per // https://github.com/crossplaneio/crossplane-runtime/issues/21 // +optional 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 managed resource.
func Available ¶
func Available() Condition
Available returns a condition that indicates the managed resource is currently observed to be available for use.
func Creating ¶
func Creating() Condition
Creating returns a condition that indicates the managed resource is currently being created.
func Deleting ¶
func Deleting() Condition
Deleting returns a condition that indicates the managed resource is currently being deleted.
func ReconcileError ¶
ReconcileError returns a condition indicating that Crossplane encountered an error while reconciling the managed resource. This could mean Crossplane was unable to update the managed resource to reflect its desired state, or that Crossplane was unable to determine the current actual state of the managed resource.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition indicating that Crossplane successfully completed the most recent reconciliation of the managed resource.
func ReferenceResolutionBlocked ¶
ReferenceResolutionBlocked returns a condition indicating that Crossplane is unable to resolve the references used in the managed 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 managed resource.
func Unavailable ¶
func Unavailable() Condition
Unavailable returns a condition that indicates the managed resource is not currently available for use. Unavailable should be set only when Crossplane expects the managed 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 = "Managed resource is available for use" ReasonCreating ConditionReason = "Managed resource is being created" ReasonDeleting ConditionReason = "Managed resource is being deleted" )
Reasons a resource is or is not ready.
const ( ReasonReconcileSuccess ConditionReason = "Successfully reconciled managed resource" ReasonReconcileError ConditionReason = "Encountered an error during managed resource reconciliation" )
Reasons a resource is or is not synced.
const ( ReasonReferenceResolveSuccess ConditionReason = "Successfully resolved managed 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
type ConditionType ¶
type ConditionType string
A ConditionType represents a condition a resource could be in.
const ( // TypeReady managed resources are believed to be ready to handle work. TypeReady ConditionType = "Ready" // TypeSynced managed resources are believed to be in sync with the // Kubernetes resources that manage their lifecycle. TypeSynced ConditionType = "Synced" // TypeReferencesResolved managed resources' references are resolved TypeReferencesResolved = "ReferencesResolved" )
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 managed 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 ReclaimPolicy ¶
type ReclaimPolicy string
A ReclaimPolicy determines what should happen to managed resources when their bound resource claims are deleted.
const ( // ReclaimDelete means the managed resource will be deleted when its bound // resource claim is deleted. ReclaimDelete ReclaimPolicy = "Delete" // ReclaimRetain means the managed resource will remain when its bound // resource claim 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 the external resource this // managed resource manages when the managed resource is deleted. "Delete" // deletes the external resource, while "Retain" (the default) does not. // Note this behaviour is subtly different from other uses of the // ReclaimPolicy concept within the Kubernetes ecosystem per // https://github.com/crossplaneio/crossplane-runtime/issues/21 // +optional 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.