Documentation ¶
Index ¶
- Constants
- Variables
- func AddScheme(addToScheme func(*runtime.Scheme) error)
- func DependOn(dag *graph.DAG, object client.Object, dependency ...client.Object)
- func FindAll[T interface{}](dag *graph.DAG) []graph.Vertex
- func FindAllNot[T interface{}](dag *graph.DAG) []graph.Vertex
- func GetScheme() *runtime.Scheme
- func IsObjectDeleting(object client.Object) bool
- func IsObjectStatusUpdating(object client.Object) bool
- func IsObjectUpdating(object client.Object) bool
- func IsOwnerOf(owner, obj client.Object) bool
- func NewRequeueError(after time.Duration, reason string) error
- func PrepareCreate(dag *graph.DAG, object client.Object)
- func PrepareDelete(dag *graph.DAG, object client.Object)
- func PrepareRootDelete(dag *graph.DAG) error
- func PrepareRootStatus(dag *graph.DAG) error
- func PrepareRootUpdate(dag *graph.DAG) error
- func PrepareStatus(dag *graph.DAG, objectOld, objectNew client.Object)
- func PrepareUpdate(dag *graph.DAG, objectOld, objectNew client.Object)
- type Action
- type GVKName
- type ObjectSnapshot
- type ObjectVertex
- type ParallelTransformer
- type RequeueError
Constants ¶
View Source
const ( CREATE = Action("CREATE") UPDATE = Action("UPDATE") DELETE = Action("DELETE") STATUS = Action("STATUS") )
View Source
const ( AppInstanceLabelKey = "app.kubernetes.io/instance" KBManagedByKey = "apps.kubeblocks.io/managed-by" RoleLabelKey = "kubeblocks.io/role" ConsensusSetAccessModeLabelKey = "cs.apps.kubeblocks.io/access-mode" )
Variables ¶
View Source
var RequeueDuration = time.Millisecond * 100
RequeueDuration default reconcile requeue after duration
Functions ¶
func IsObjectDeleting ¶
func IsObjectStatusUpdating ¶
func IsObjectUpdating ¶
func PrepareRootDelete ¶
func PrepareRootStatus ¶
func PrepareRootUpdate ¶
Types ¶
type ObjectSnapshot ¶
func ReadCacheSnapshot ¶
func ReadCacheSnapshot(transCtx graph.TransformContext, root client.Object, ml client.MatchingLabels, kinds ...client.ObjectList) (ObjectSnapshot, error)
ReadCacheSnapshot reads all objects owned by our cluster
type ObjectVertex ¶
type ObjectVertex struct { Obj client.Object OriObj client.Object Immutable bool IsOrphan bool Action *Action }
ObjectVertex describes expected object spec and how to reach it obj always represents the expected part: new object in Create/Update action and old object in Delete action oriObj is set in Update action all transformers doing their object manipulation works on obj.spec the root vertex(i.e. the cluster vertex) will be treated specially: as all its meta, spec and status can be updated in one reconciliation loop Update is ignored when immutable=true orphan object will be force deleted when action is DELETE
func FindRootVertex ¶
func FindRootVertex(dag *graph.DAG) (*ObjectVertex, error)
func (ObjectVertex) String ¶
func (v ObjectVertex) String() string
type ParallelTransformer ¶
type ParallelTransformer struct {
Transformers []graph.Transformer
}
func (*ParallelTransformer) Transform ¶
func (t *ParallelTransformer) Transform(ctx graph.TransformContext, dag *graph.DAG) error
type RequeueError ¶
Click to show internal directories.
Click to hide internal directories.