Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the dcontroller.io API group.
Index ¶
Constants ¶
const ( // ControllerConditionReady represents the Ready condition. ControllerConditionReady ControllerConditionType = "Ready" // ControllerReasonReady is used with the "Ready" condition when the condition is true. ControllerReasonReady ControllerConditionReason = "Ready" // ControllerReasonReconciliationFailed is used with the "Ready" condition when // reconciliation has failed for some input resources. ControllerReasonReconciliationFailed ControllerConditionReason = "ReconciliationFailed" // ControllerReasonNotReady is used with the "Ready" condition when the controller is not // ready for processing events. ControllerReasonNotReady ControllerConditionReason = "NotReady" )
Variables ¶
var ( // GroupVersion is group version used to register operators. GroupVersion = schema.GroupVersion{Group: "dcontroller.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶
type Aggregation struct {
Expressions []expression.Expression `json:"@aggregate"`
}
Aggregation is an operation that can be used to process, objects, or alter the shape of a list of objects in a view.
func (*Aggregation) DeepCopy ¶
func (in *Aggregation) DeepCopy() *Aggregation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Aggregation.
func (*Aggregation) DeepCopyInto ¶
func (in *Aggregation) DeepCopyInto(out *Aggregation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Controller ¶
type Controller struct {
// Name is the unique name of the controller.
Name string `json:"name"`
// The base resource(s) the controller watches.
Sources []Source `json:"sources"`
// Pipeline is an aggregation pipeline applied to base objects.
//
// +kubebuilder:validation:Schemaless
// +kubebuilder:pruning:PreserveUnknownFields
Pipeline Pipeline `json:"pipeline"`
// The target resource the results are to be added.
Target Target `json:"target"`
}
Controller is a translator that processes a set of base resources via a declarative pipeline into a delta on the target resource. A controller is defined by a name, a set of sources, a processing pipeline and a target.
func (*Controller) DeepCopy ¶
func (in *Controller) DeepCopy() *Controller
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Controller.
func (*Controller) DeepCopyInto ¶
func (in *Controller) DeepCopyInto(out *Controller)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerConditionReason ¶
type ControllerConditionReason string
ControllerConditionReason defines the set of reasons that explain why a particular Controller condition type has been raised.
type ControllerConditionType ¶
type ControllerConditionType string
ControllerConditionType is a type of condition associated with a Controller. This type should be used with the ControllerStatus.Conditions field.
type ControllerStatus ¶
type ControllerStatus struct {
Name string `json:"name"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
LastErrors []string `json:"lastErrors,omitempty"`
}
ControllerStatus specifies the status of a controller.
func (*ControllerStatus) DeepCopy ¶
func (in *ControllerStatus) DeepCopy() *ControllerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerStatus.
func (*ControllerStatus) DeepCopyInto ¶
func (in *ControllerStatus) DeepCopyInto(out *ControllerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Join ¶
type Join struct {
Expression expression.Expression `json:"@join"`
}
Join is an operation that can be used to perform an inner join on a list of views.
func (*Join) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Join.
func (*Join) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Operator ¶
type Operator struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired state of an operator.
Spec OperatorSpec `json:"spec"`
// Status defines the current state of the operator.
Status OperatorStatus `json:"status,omitempty"`
}
Operator is an abstraction of a basic unit of automation, a set of related controllers working on a single shared view of resources.
+genclient:nonNamespaced +kubebuilder:object:root=true +kubebuilder:resource:categories=dcontroller,scope=Cluster,shortName=operators +kubebuilder:subresource:status +kubebuilder:storageversion // +kubebuilder:printcolumn:name="ControllerNum",type=integer,JSONPath=`length(.spec.controllers)` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*Operator) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operator.
func (*Operator) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Operator) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorList ¶
type OperatorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Operator `json:"items"`
}
OperatorList contains a list of operators.
func (*OperatorList) DeepCopy ¶
func (in *OperatorList) DeepCopy() *OperatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorList.
func (*OperatorList) DeepCopyInto ¶
func (in *OperatorList) DeepCopyInto(out *OperatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorList) DeepCopyObject ¶
func (in *OperatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorSpec ¶
type OperatorSpec struct {
// Controllers is a list of controllers that collectively implement the operator.
//
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=255
Controllers []Controller `json:"controllers"`
}
OperatorSpec defines the desired state of an operator.
func (*OperatorSpec) DeepCopy ¶
func (in *OperatorSpec) DeepCopy() *OperatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorSpec.
func (*OperatorSpec) DeepCopyInto ¶
func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorStatus ¶
type OperatorStatus struct {
Controllers []ControllerStatus `json:"controllers"`
}
OperatorStatus specifies the status of an operator.
func (*OperatorStatus) DeepCopy ¶
func (in *OperatorStatus) DeepCopy() *OperatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus.
func (*OperatorStatus) DeepCopyInto ¶
func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pipeline ¶
type Pipeline struct {
*Join `json:",inline"`
*Aggregation `json:",inline"`
}
Pipeline is an optional join followed by an aggregation.
func (*Pipeline) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline.
func (*Pipeline) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Resource ¶
type Resource struct {
// Group is the API group. Default is "<operator-name>.view.dcontroller.io", where
// <operator-name> is the name of the operator that manages the object.
Group *string `json:"apiGroup,omitempty"`
// Version is the version of the resource. Optional.
Version *string `json:"version,omitempty"`
// Kind is the type of the resource. Mandatory.
Kind string `json:"kind"`
}
Resource specifies a resource by the GVK.
func (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Source ¶
type Source struct {
Resource `json:",inline"`
// Namespace, if given, restricts the source to generate events only from the given namespace.
Namespace *string `json:"namespace,omitempty"`
// LabelSelector is an optional label selector to filter events on this source.
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
// Predicate is a controller runtime predicate for filtering events on this source.
//
// +kubebuilder:validation:Schemaless
// +kubebuilder:pruning:PreserveUnknownFields
Predicate *predicate.Predicate `json:"predicate,omitempty"`
}
Source is a watch source that feeds deltas into the controller.
func (*Source) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source.
func (*Source) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Target ¶
type Target struct {
Resource `json:",inline"`
// Type is the type of the target.
Type TargetType `json:"type,omitempty"`
}
Target is the target reource type in which the controller writes.
func (*Target) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.
func (*Target) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetType ¶
type TargetType string
TargetType represents the type of a target.
const ( // Updater is a target that will fully overwrite the target resource with the update. Updater TargetType = "Updater" // Patcher is a target that applies the update as a patch to the target resource. Patcher TargetType = "Patcher" )