Documentation ¶
Index ¶
- type AnySpec
- type BaseClusterReconciler
- func (r *BaseClusterReconciler[T]) AddResource(resource Reconciler)
- func (r *BaseClusterReconciler[T]) GetResources() []Reconciler
- func (r *BaseClusterReconciler[T]) Ready(ctx context.Context) Result
- func (r *BaseClusterReconciler[T]) Reconcile(ctx context.Context) Result
- func (r *BaseClusterReconciler[T]) RegisterResources(ctx context.Context) error
- type BaseReconciler
- func (b *BaseReconciler[T]) GetClient() *client.Client
- func (b *BaseReconciler[T]) GetCtrlClient() ctrlclient.Client
- func (b *BaseReconciler[T]) GetCtrlScheme() *runtime.Scheme
- func (b *BaseReconciler[T]) GetName() string
- func (b *BaseReconciler[T]) GetNamespace() string
- func (b *BaseReconciler[T]) GetSpec() T
- func (b *BaseReconciler[T]) Ready(ctx context.Context) Result
- func (b *BaseReconciler[T]) Reconcile(ctx context.Context) Result
- type BaseRoleReconciler
- type ClusterReconciler
- type DeploymentReconciler
- type GenericResourceReconciler
- func (r *GenericResourceReconciler[B]) GetBuilder() B
- func (r *GenericResourceReconciler[b]) GetObjectMeta() metav1.ObjectMeta
- func (r *GenericResourceReconciler[B]) Ready(ctx context.Context) Result
- func (r *GenericResourceReconciler[B]) Reconcile(ctx context.Context) Result
- func (r *GenericResourceReconciler[B]) ResourceReconcile(ctx context.Context, resource ctrlclient.Object) Result
- type GenericServiceReconciler
- type Reconciler
- type ResourceReconciler
- type Result
- type RoleReconciler
- type SimpleResourceReconciler
- type StatefulSetReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClusterReconciler ¶
type BaseClusterReconciler[T AnySpec] struct { BaseReconciler[T] // contains filtered or unexported fields }
func (*BaseClusterReconciler[T]) AddResource ¶
func (r *BaseClusterReconciler[T]) AddResource(resource Reconciler)
func (*BaseClusterReconciler[T]) GetResources ¶
func (r *BaseClusterReconciler[T]) GetResources() []Reconciler
func (*BaseClusterReconciler[T]) Ready ¶
func (r *BaseClusterReconciler[T]) Ready(ctx context.Context) Result
func (*BaseClusterReconciler[T]) Reconcile ¶
func (r *BaseClusterReconciler[T]) Reconcile(ctx context.Context) Result
func (*BaseClusterReconciler[T]) RegisterResources ¶
func (r *BaseClusterReconciler[T]) RegisterResources(ctx context.Context) error
type BaseReconciler ¶
type BaseReconciler[T AnySpec] struct { // Do not use ptr, to avoid other packages to modify the client Client *client.Client Options builder.Options Spec T }
func (*BaseReconciler[T]) GetClient ¶
func (b *BaseReconciler[T]) GetClient() *client.Client
func (*BaseReconciler[T]) GetCtrlClient ¶
func (b *BaseReconciler[T]) GetCtrlClient() ctrlclient.Client
func (*BaseReconciler[T]) GetCtrlScheme ¶
func (b *BaseReconciler[T]) GetCtrlScheme() *runtime.Scheme
func (*BaseReconciler[T]) GetName ¶
func (b *BaseReconciler[T]) GetName() string
func (*BaseReconciler[T]) GetNamespace ¶
func (b *BaseReconciler[T]) GetNamespace() string
func (*BaseReconciler[T]) GetSpec ¶
func (b *BaseReconciler[T]) GetSpec() T
type BaseRoleReconciler ¶
type BaseRoleReconciler[T AnySpec] struct { BaseClusterReconciler[T] Options *builder.RoleOptions }
func NewBaseRoleReconciler ¶
func NewBaseRoleReconciler[T AnySpec]( client *client.Client, roleOptions *builder.RoleOptions, spec T, ) *BaseRoleReconciler[T]
func (*BaseRoleReconciler[T]) GetClusterOperation ¶
func (b *BaseRoleReconciler[T]) GetClusterOperation() *apiv1alpha1.ClusterOperationSpec
func (*BaseRoleReconciler[T]) MergeRoleGroupSpec ¶
func (b *BaseRoleReconciler[T]) MergeRoleGroupSpec(roleGroup any)
MergeRoleGroupSpec merge right to left, if field of right not exist in left, add it to left. else skip it. merge will modify left, so left must be a pointer.
type ClusterReconciler ¶
type ClusterReconciler interface { Reconciler GetClusterOperation() *apiv1alpha1.ClusterOperationSpec GetResources() []Reconciler AddResource(resource Reconciler) RegisterResources(ctx context.Context) error }
type DeploymentReconciler ¶
type DeploymentReconciler struct { GenericResourceReconciler[builder.DeploymentBuilder] Options *builder.RoleGroupOptions }
func NewDeploymentReconciler ¶
func NewDeploymentReconciler( client *client.Client, options *builder.RoleGroupOptions, deployBuilder builder.DeploymentBuilder, ) *DeploymentReconciler
type GenericResourceReconciler ¶
type GenericResourceReconciler[B builder.Builder] struct { BaseReconciler[AnySpec] Builder B }
func (*GenericResourceReconciler[B]) GetBuilder ¶
func (r *GenericResourceReconciler[B]) GetBuilder() B
func (*GenericResourceReconciler[b]) GetObjectMeta ¶
func (r *GenericResourceReconciler[b]) GetObjectMeta() metav1.ObjectMeta
func (*GenericResourceReconciler[B]) Ready ¶
func (r *GenericResourceReconciler[B]) Ready(ctx context.Context) Result
func (*GenericResourceReconciler[B]) Reconcile ¶
func (r *GenericResourceReconciler[B]) Reconcile(ctx context.Context) Result
func (*GenericResourceReconciler[B]) ResourceReconcile ¶
func (r *GenericResourceReconciler[B]) ResourceReconcile(ctx context.Context, resource ctrlclient.Object) Result
type GenericServiceReconciler ¶
type GenericServiceReconciler struct { GenericResourceReconciler[builder.ServiceBuilder] }
func NewServiceReconciler ¶
func NewServiceReconciler( client *client.Client, options builder.Options, ) *GenericServiceReconciler
type Reconciler ¶
type ResourceReconciler ¶
type ResourceReconciler[B builder.Builder] interface { Reconciler GetObjectMeta() metav1.ObjectMeta GetBuilder() B ResourceReconcile(ctx context.Context, resource ctrlclient.Object) Result }
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) RequeueOrNot ¶
type RoleReconciler ¶
type RoleReconciler interface { ClusterReconciler }
type SimpleResourceReconciler ¶
type SimpleResourceReconciler[B builder.Builder] struct { GenericResourceReconciler[B] }
func NewSimpleResourceReconciler ¶
func NewSimpleResourceReconciler[B builder.Builder]( client *client.Client, clusterOptions builder.Options, builder B, ) *SimpleResourceReconciler[B]
NewSimpleResourceReconciler creates a new resource reconciler with a simple builder that does not require a spec, and can not use the spec.
type StatefulSetReconciler ¶
type StatefulSetReconciler struct { GenericResourceReconciler[builder.StatefulSetBuilder] Options *builder.RoleGroupOptions }
func NewStatefulSetReconciler ¶
func NewStatefulSetReconciler( client *client.Client, options *builder.RoleGroupOptions, stsBuilder builder.StatefulSetBuilder, ) *StatefulSetReconciler
Click to show internal directories.
Click to hide internal directories.