Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the crossplane core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.crossplane.io
Package v1alpha1 contains API Schema definitions for the crossplane core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.crossplane.io
Index ¶
- Constants
- Variables
- func AssertConditions(g *gomega.GomegaWithT, expected []Condition, actual ConditionedStatus)
- func MatchCondition(expected interface{}) types.GomegaMatcher
- func MatchConditionedStatus(expected interface{}) types.GomegaMatcher
- type BasicResource
- type BindingState
- type BindingStatus
- type BindingStatusPhase
- func (in *BindingStatusPhase) DeepCopy() *BindingStatusPhase
- func (in *BindingStatusPhase) DeepCopyInto(out *BindingStatusPhase)
- func (b *BindingStatusPhase) IsBound() bool
- func (b *BindingStatusPhase) IsUnbound() bool
- func (b *BindingStatusPhase) SetBound()
- func (b *BindingStatusPhase) SetUnbound()
- type Condition
- type ConditionMatcher
- type ConditionType
- type Conditionable
- type ConditionedStatus
- func (c *ConditionedStatus) Condition(conditionType ConditionType) *Condition
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (c *ConditionedStatus) IsCondition(ctype ConditionType) bool
- func (c *ConditionedStatus) IsFailed() bool
- func (c *ConditionedStatus) IsReady() bool
- func (c *ConditionedStatus) RemoveAllConditions()
- func (c *ConditionedStatus) RemoveCondition(condType ConditionType)
- func (c *ConditionedStatus) SetCondition(condition Condition)
- func (c *ConditionedStatus) SetCreating()
- func (c *ConditionedStatus) SetDeleting()
- func (c *ConditionedStatus) SetFailed(reason, msg string)
- func (c *ConditionedStatus) SetReady()
- func (c *ConditionedStatus) UnsetAllConditions()
- func (c *ConditionedStatus) UnsetCondition(conditionType ConditionType)
- type ConditionedStatusMatcher
- type ReclaimPolicy
- type Resource
- type ResourceClass
- type ResourceClassList
- type ResourceList
- type ResourceName
Constants ¶
const ( Group = "core.crossplane.io" Version = "v1alpha1" ResourceClassKind = "resourceclass" APIVersion = Group + "/" + Version )
const ( // ResourceCredentialsSecretEndpointKey is the key inside a connection secret for the connection endpoint ResourceCredentialsSecretEndpointKey = "endpoint" // 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" // ResourceCredentialsSecretKubeconfigFileKey is the key inside a connection secret for the full kubeconfig file ResourceCredentialsSecretKubeconfigFileKey = "kubeconfig" )
Variables ¶
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} )
Functions ¶
func AssertConditions ¶
func AssertConditions(g *gomega.GomegaWithT, expected []Condition, actual ConditionedStatus)
AssertConditions verifies the given expected conditions against the given actual conditions. This is helpful for unit tests since the Condition type has a timestamp that makes full object equal comparisons difficult. TODO: consider to use ConditionMatcher or ConditionedStatusMatcher instead
func MatchCondition ¶
func MatchCondition(expected interface{}) types.GomegaMatcher
func MatchConditionedStatus ¶
func MatchConditionedStatus(expected interface{}) types.GomegaMatcher
Types ¶
type BasicResource ¶
type BasicResource struct { Resource // contains filtered or unexported fields }
BasicResource base structure that implements Resource interface +k8s:deepcopy-gen=false
func NewBasicResource ¶
func NewBasicResource(ref *corev1.ObjectReference, secretName, endpoint, state string) *BasicResource
NewBasicResource new instance of base resource
func (*BasicResource) ConnectionSecretName ¶
func (br *BasicResource) ConnectionSecretName() string
ConnectionSecretName referenced by this resource
func (*BasicResource) Endpoint ¶
func (br *BasicResource) Endpoint() string
Endpoint to establish connection to this resource
func (*BasicResource) ObjectReference ¶
func (br *BasicResource) ObjectReference() *corev1.ObjectReference
ObjectReference to this resource
type BindingState ¶
type BindingState string
BindingState is to identify the current binding status of given resources
const ( // BindingStateBound signifies that resource has one ore more active bindings BindingStateBound BindingState = "Bound" // BindingStateUnbound signifies that the resource has no active bindings // Default BindingState BindingStateUnbound BindingState = "Unbound" )
type BindingStatus ¶
BindingStatus defines set of supported operations
type BindingStatusPhase ¶
type BindingStatusPhase struct {
Phase BindingState `json:"bindingPhase,omitempty"` // binding status of the instance
}
BindingStatusPhase defines field(s) representing resource status
func (*BindingStatusPhase) DeepCopy ¶
func (in *BindingStatusPhase) DeepCopy() *BindingStatusPhase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingStatusPhase.
func (*BindingStatusPhase) DeepCopyInto ¶
func (in *BindingStatusPhase) DeepCopyInto(out *BindingStatusPhase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BindingStatusPhase) IsBound ¶
func (b *BindingStatusPhase) IsBound() bool
IsBound returns true if status is bound
func (*BindingStatusPhase) IsUnbound ¶
func (b *BindingStatusPhase) IsUnbound() bool
IsUnbound returns true if status is unbound
func (*BindingStatusPhase) SetBound ¶
func (b *BindingStatusPhase) SetBound()
SetBound set binding status to Bound
func (*BindingStatusPhase) SetUnbound ¶
func (b *BindingStatusPhase) SetUnbound()
SetUnbound set binding status to Unbound
type Condition ¶
type Condition struct { Type ConditionType Status corev1.ConditionStatus LastTransitionTime metav1.Time Reason string Message string }
Condition contains details for the current condition of this pod.
func FilterOutCondition ¶
func FilterOutCondition(conditions []Condition, condType ConditionType) []Condition
FilterOutProviderCondition returns a new slice of credentials controller conditions without conditions with the provided type.
func NewCondition ¶
func NewCondition(condType ConditionType, reason, msg string) Condition
NewCondition creates a new RDS resource condition.
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.
type ConditionMatcher ¶
type ConditionMatcher struct {
// contains filtered or unexported fields
}
ConditionMatcher +k8s:deepcopy-gen=false
func (*ConditionMatcher) FailureMessage ¶
func (cm *ConditionMatcher) FailureMessage(actual interface{}) (message string)
func (*ConditionMatcher) Match ¶
func (cm *ConditionMatcher) Match(actual interface{}) (success bool, err error)
func (*ConditionMatcher) NegatedFailureMessage ¶
func (cm *ConditionMatcher) NegatedFailureMessage(actual interface{}) (message string)
type ConditionType ¶
type ConditionType string
ConditionType type for possible conditions the resource could be in.
const ( // Pending means that the resource create request has been received and waiting to be fulfilled Pending ConditionType = "Pending" // Creating means that the DB resource create request has been processed and managed resource is being created Creating ConditionType = "Creating" // Deleting means that the resource is being deleted. Deleting ConditionType = "Deleting" // Failed means that the resource creation has failed. Failed ConditionType = "Failed" // Ready means that the resource creation has been successful. Ready ConditionType = "Ready" )
type Conditionable ¶
type Conditionable interface { GetCondition(ConditionType) *Condition SetCondition(Condition) RemoveCondition(ConditionType) UnsetCondition(ConditionType) UnsetAllConditions() }
Conditionable defines set of functionality to operate on Conditions
type ConditionedStatus ¶
type ConditionedStatus struct { // Conditions indicate state for particular aspects of a CustomResourceDefinition Conditions []Condition }
ConditionedStatus defines the observed state of RDS resource
func (*ConditionedStatus) Condition ¶
func (c *ConditionedStatus) Condition(conditionType ConditionType) *Condition
Condition returns a provider condition with the provided type if it exists.
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) IsCondition ¶
func (c *ConditionedStatus) IsCondition(ctype ConditionType) bool
IsCondition of provided type is present and set to true
func (*ConditionedStatus) RemoveAllConditions ¶
func (c *ConditionedStatus) RemoveAllConditions()
RemoveAllConditions removes all condition entries
func (*ConditionedStatus) RemoveCondition ¶
func (c *ConditionedStatus) RemoveCondition(condType ConditionType)
RemoveCondition removes the condition with the provided type from the credentials controller status.
func (*ConditionedStatus) SetCondition ¶
func (c *ConditionedStatus) SetCondition(condition Condition)
SetCondition adds/replaces the given condition in the credentials controller status.
func (*ConditionedStatus) SetCreating ¶
func (c *ConditionedStatus) SetCreating()
SetCreating set creating as an active condition
func (*ConditionedStatus) SetDeleting ¶
func (c *ConditionedStatus) SetDeleting()
SetDeleting set creating as an active condition
func (*ConditionedStatus) SetFailed ¶
func (c *ConditionedStatus) SetFailed(reason, msg string)
SetFailed set failed as an active condition
func (*ConditionedStatus) SetReady ¶
func (c *ConditionedStatus) SetReady()
SetReady set ready as an active condition
func (*ConditionedStatus) UnsetAllConditions ¶
func (c *ConditionedStatus) UnsetAllConditions()
UnsetAllConditions set conditions status to false on all conditions
func (*ConditionedStatus) UnsetCondition ¶
func (c *ConditionedStatus) UnsetCondition(conditionType ConditionType)
UnsetCondition set condition status to false with the given type - if found.
type ConditionedStatusMatcher ¶
type ConditionedStatusMatcher struct {
// contains filtered or unexported fields
}
ConditionedStatusMatcher +k8s:deepcopy-gen=false
func (*ConditionedStatusMatcher) FailureMessage ¶
func (csm *ConditionedStatusMatcher) FailureMessage(actual interface{}) (message string)
func (*ConditionedStatusMatcher) Match ¶
func (csm *ConditionedStatusMatcher) Match(actual interface{}) (success bool, err error)
func (*ConditionedStatusMatcher) NegatedFailureMessage ¶
func (csm *ConditionedStatusMatcher) NegatedFailureMessage(actual interface{}) (message string)
type ReclaimPolicy ¶
type ReclaimPolicy string
ReclaimPolicy describes a policy for end-of-life maintenance of storage resources
const ( // ReclaimDelete means the cloud provider resource backing this custom resource (CR) will be deleted upon CR deletion ReclaimDelete ReclaimPolicy = "Delete" // ReclaimRetain means the cloud provider resource backing this custom resource (CR) will be will be left in its current phase upon CR deletion for manual reclamation by the administrator. // The default policy is Retain. ReclaimRetain ReclaimPolicy = "Retain" )
type Resource ¶
type Resource interface { // Resource connection secret name ConnectionSecretName() string // Resource endpoint for connection Endpoint() string // Kubernetes object reference to this resource ObjectReference() *corev1.ObjectReference // Is resource available for finding IsAvailable() bool // IsBound() bool IsBound() bool // Update bound status of the resource SetBound(bool) }
Resource defines operations supported by managed resource
type ResourceClass ¶
type ResourceClass struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Parameters holds parameters for the provisioner. // These values are opaque to the system and are passed directly // to the provisioner. The only validation done on keys is that they are // not empty. The maximum number of parameters is // 512, with a cumulative max size of 256K // +optional Parameters map[string]string `json:"parameters,omitempty"` // Provisioner is the driver expected to handle this ResourceClass. // This is an optionally-prefixed name, like a label key. // For example: "RDSInstance.database.aws.crossplane.io/v1alpha1" or "CloudSQLInstance.database.gcp.crossplane.io/v1alpha1". // This value may not be empty. Provisioner string `json:"provisioner"` // ProvierRef is the reference to cloud provider that will be used // to provision the concrete cloud resource ProviderRef corev1.LocalObjectReference `json:"providerRef"` // reclaimPolicy is the reclaim policy that dynamically provisioned // ResourceInstances of this resource class are created with // +optional ReclaimPolicy ReclaimPolicy `json:"reclaimPolicy,omitempty"` }
ResourceClass is the Schema for the instances API +k8s:openapi-gen=true
func (*ResourceClass) DeepCopy ¶
func (in *ResourceClass) DeepCopy() *ResourceClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClass.
func (*ResourceClass) DeepCopyInto ¶
func (in *ResourceClass) DeepCopyInto(out *ResourceClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClass) DeepCopyObject ¶
func (in *ResourceClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ResourceClass) ObjectReference ¶
func (r *ResourceClass) ObjectReference() *corev1.ObjectReference
ObjectReference to this mysql instance
type ResourceClassList ¶
type ResourceClassList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ResourceClass `json:"items"` }
ResourceClassList contains a list of RDSInstance
func (*ResourceClassList) DeepCopy ¶
func (in *ResourceClassList) DeepCopy() *ResourceClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassList.
func (*ResourceClassList) DeepCopyInto ¶
func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceClassList) DeepCopyObject ¶
func (in *ResourceClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceList ¶
type ResourceList map[ResourceName]resource.Quantity
ResourceList is a set of (resource name, quantity) pairs.
func (ResourceList) DeepCopy ¶
func (in ResourceList) DeepCopy() ResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.
func (ResourceList) DeepCopyInto ¶
func (in ResourceList) DeepCopyInto(out *ResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceName ¶
type ResourceName string
ResourceName is the name identifying various resources in a ResourceList.
const ( // CPU, in cores. (500m = .5 cores) ResourceCPU ResourceName = "cpu" // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) ResourceMemory ResourceName = "memory" // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024) ResourceStorage ResourceName = "storage" )
Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters, with the -, _, and . characters allowed anywhere, except the first or last character. The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than camel case, separating compound words. Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.