Documentation
¶
Overview ¶
Package v1 contains core API types used by most ndd resources. +kubebuilder:object:generate=true
Index ¶
- Constants
- type Condition
- func Creating() Condition
- func Deleting() Condition
- func ExternalLeafRefValidationFailure() Condition
- func ExternalLeafRefValidationSuccess() Condition
- func InternalLeafRefValidationFailure() Condition
- func InternalLeafRefValidationSuccess() Condition
- func ParentValidationFailure() Condition
- func ParentValidationSuccess() Condition
- func ReconcileFailure() Condition
- func ReconcileSuccess() Condition
- func TargetFound() Condition
- func TargetNotFound() Condition
- type ConditionKind
- type ConditionReason
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (s *ConditionedStatus) GetCondition(ck ConditionKind) Condition
- func (s *ConditionedStatus) SetConditions(c ...Condition)
- type DeletionPolicy
- type DeviceType
- type ProviderConfigStatus
- type ProviderConfigUsage
- type Reference
- type ResourceSpec
- type ResourceStatus
- type Selector
- type Target
- type TargetConditions
- type TypedReference
- func (in *TypedReference) DeepCopy() *TypedReference
- func (in *TypedReference) DeepCopyInto(out *TypedReference)
- func (obj *TypedReference) GetObjectKind() schema.ObjectKind
- func (obj *TypedReference) GroupVersionKind() schema.GroupVersionKind
- func (obj *TypedReference) SetGroupVersionKind(gvk schema.GroupVersionKind)
Constants ¶
const ( // labels TargetLabelKey = "target" TargetLabelValueAll = "all" // errors ErrFindingTargets = "cannot find targets" ErrTargetNotFound = "cannot find a valid target" // info InfoTargetDeleted = "target got deleted" InfoTargetFound = "target(s) found" )
const LabelKeyProviderName = "ndd.henderiw.be/provider-config"
LabelKeyProviderName is added to ProviderConfigUsages to relate them to their ProviderConfig.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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. Kind ConditionKind `json:"kind"` // 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 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 ExternalLeafRefValidationFailure ¶
func ExternalLeafRefValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ExternalLeafRefValidationSuccess ¶
func ExternalLeafRefValidationSuccess() Condition
ExternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func InternalLeafRefValidationFailure ¶
func InternalLeafRefValidationFailure() Condition
InternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func InternalLeafRefValidationSuccess ¶
func InternalLeafRefValidationSuccess() Condition
InternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func ParentValidationFailure ¶
func ParentValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ParentValidationSuccess ¶
func ParentValidationSuccess() Condition
ParentValidationFailure returns a condition that indicates the resource parent is found
func ReconcileFailure ¶
func ReconcileFailure() Condition
Unavailable returns a condition that indicates the resource is not currently available for use.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition that indicates the resource is currently successfully reconciled
func TargetFound ¶
func TargetFound() Condition
TargetFound returns a condition that indicates the resource has target(s) available for use.
func TargetNotFound ¶
func TargetNotFound() Condition
TargetNotFound returns a condition that indicates the resource has no target(s) available for use.
func (*Condition) DeepCopy ¶ added in v0.3.7
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶ added in v0.3.7
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 ConditionKind ¶
type ConditionKind string
A ConditionKind represents a condition kind for a resource
const ( // handled per resource ConditionKindInternalLeafRef ConditionKind = "InternalLeafrefValidationSuccess" // handled per target per resource ConditionKindExternalLeafRef ConditionKind = "ExternalLeafrefValidationSuccess" // handled per resource ConditionKindParent ConditionKind = "ParentValidationSuccess" // handled per resource ConditionKindTarget ConditionKind = "TargetFound" // handled per target per resource ConditionKindConfiguration ConditionKind = "ConfigurationSuccess" )
Condition Kinds.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ConditionReasonSuccess ConditionReason = "Success" ConditionReasonFailed ConditionReason = "Failed" )
Reasons a resource validation is or is not ok
const ( ConditionReasonFound ConditionReason = "Target Found" ConditionReasonNotFound ConditionReason = "No valid target Found" )
Reasons a resource target is or is not ok
const ( ConditionReasonNone ConditionReason = "None" ConditionReasonCreating ConditionReason = "Creating" ConditionReasonDeleting ConditionReason = "Deleting" ConditionReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ConditionReasonReconcileFailure ConditionReason = "ReconcileFailure" )
Reasons a resource is or is not ready wrt configuration
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 kind may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) DeepCopy ¶ added in v0.3.7
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (*ConditionedStatus) DeepCopyInto ¶ added in v0.3.7
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(ck ConditionKind) Condition
GetCondition returns the condition for the given ConditionKind 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 kind. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.
type DeletionPolicy ¶ added in v0.3.50
type DeletionPolicy string
A DeletionPolicy determines what should happen to the underlying external resource when a managed resource is deleted. +kubebuilder:validation:Enum=Orphan;Delete
const ( // DeletionOrphan means the external resource will orphaned when its managed // resource is deleted. DeletionOrphan DeletionPolicy = "Orphan" // DeletionDelete means both the external resource will be deleted when its // managed resource is deleted. DeletionDelete DeletionPolicy = "Delete" )
type DeviceType ¶ added in v0.3.38
type DeviceType string
const (
DeviceTypeUnknown DeviceType = ""
)
func DeviceTypePtr ¶ added in v0.3.38
func DeviceTypePtr(c DeviceType) *DeviceType
type ProviderConfigStatus ¶ added in v0.3.50
type ProviderConfigStatus struct { ConditionedStatus `json:",inline"` // Users of this provider configuration. Users int64 `json:"users,omitempty"` }
A ProviderConfigStatus defines the observed status of a ProviderConfig.
func (*ProviderConfigStatus) DeepCopy ¶ added in v0.3.53
func (in *ProviderConfigStatus) DeepCopy() *ProviderConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfigStatus.
func (*ProviderConfigStatus) DeepCopyInto ¶ added in v0.3.53
func (in *ProviderConfigStatus) DeepCopyInto(out *ProviderConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProviderConfigUsage ¶ added in v0.3.50
type ProviderConfigUsage struct { // ProviderConfigReference to the provider config being used. ProviderConfigReference Reference `json:"providerConfigRef"` // ResourceReference to the managed resource using the provider config. ResourceReference TypedReference `json:"resourceRef"` }
A ProviderConfigUsage is a record that a particular managed resource is using a particular provider configuration.
func (*ProviderConfigUsage) DeepCopy ¶ added in v0.3.53
func (in *ProviderConfigUsage) DeepCopy() *ProviderConfigUsage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfigUsage.
func (*ProviderConfigUsage) DeepCopyInto ¶ added in v0.3.53
func (in *ProviderConfigUsage) DeepCopyInto(out *ProviderConfigUsage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Reference ¶ added in v0.3.10
type Reference struct { // Name of the referenced object. Name string `json:"name"` }
A Reference to a named object.
func (*Reference) DeepCopy ¶ added in v0.3.10
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reference.
func (*Reference) DeepCopyInto ¶ added in v0.3.10
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶ added in v0.3.50
type ResourceSpec struct { // ProviderConfigReference specifies how the provider that will be used to // create, observe, update, and delete this managed resource should be // configured. // +kubebuilder:default={"name": "default"} ProviderConfigReference *Reference `json:"providerConfigRef,omitempty"` // DeletionPolicy specifies what will happen to the underlying external // when this managed resource is deleted - either "Delete" or "Orphan" the // external resource. // +optional // +kubebuilder:default=Delete DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"` }
A ResourceSpec defines the desired state of a managed resource.
func (*ResourceSpec) DeepCopy ¶ added in v0.3.53
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶ added in v0.3.53
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 ¶ added in v0.3.52
type ResourceStatus struct { ConditionedStatus `json:",inline"` TargetConditions map[string]*TargetConditions `json:"targetConditions,omitempty"` }
ResourceStatus represents the observed state of a managed resource.
func (*ResourceStatus) DeepCopy ¶ added in v0.3.53
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶ added in v0.3.53
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Selector ¶ added in v0.3.50
type Selector struct { // MatchLabels ensures an object with matching labels is selected. MatchLabels map[string]string `json:"matchLabels,omitempty"` // MatchControllerRef ensures an object with the same controller reference // as the selecting object is selected. MatchControllerRef *bool `json:"matchControllerRef,omitempty"` }
A Selector selects an object.
func (*Selector) DeepCopy ¶ added in v0.3.53
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selector.
func (*Selector) DeepCopyInto ¶ added in v0.3.53
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Target ¶ added in v0.3.41
func (*Target) DeepCopy ¶ added in v0.3.53
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.
func (*Target) DeepCopyInto ¶ added in v0.3.53
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetConditions ¶ added in v0.3.52
type TargetConditions struct {
ConditionedStatus `json:",inline"`
}
func (*TargetConditions) DeepCopy ¶ added in v0.3.53
func (in *TargetConditions) DeepCopy() *TargetConditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConditions.
func (*TargetConditions) DeepCopyInto ¶ added in v0.3.53
func (in *TargetConditions) DeepCopyInto(out *TargetConditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TypedReference ¶ added in v0.3.24
type TypedReference struct { // APIVersion of the referenced object. APIVersion string `json:"apiVersion"` // Kind of the referenced object. Kind string `json:"kind"` // Name of the referenced object. Name string `json:"name"` // UID of the referenced object. // +optional UID types.UID `json:"uid,omitempty"` }
A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known.
func (*TypedReference) DeepCopy ¶ added in v0.3.24
func (in *TypedReference) DeepCopy() *TypedReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedReference.
func (*TypedReference) DeepCopyInto ¶ added in v0.3.24
func (in *TypedReference) DeepCopyInto(out *TypedReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TypedReference) GetObjectKind ¶ added in v0.3.50
func (obj *TypedReference) GetObjectKind() schema.ObjectKind
GetObjectKind get the ObjectKind of a TypedReference.
func (*TypedReference) GroupVersionKind ¶ added in v0.3.50
func (obj *TypedReference) GroupVersionKind() schema.GroupVersionKind
GroupVersionKind gets the GroupVersionKind of a TypedReference.
func (*TypedReference) SetGroupVersionKind ¶ added in v0.3.50
func (obj *TypedReference) SetGroupVersionKind(gvk schema.GroupVersionKind)
SetGroupVersionKind sets the Kind and APIVersion of a TypedReference.