Documentation
¶
Index ¶
- Constants
- Variables
- type BaseReconciler
- func (r *BaseReconciler) GetAPIServerRouteURL(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (string, error)
- func (r *BaseReconciler) GetConfig(ctx context.Context) (*SharedConfig, error)
- func (r *BaseReconciler) Reconcile(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (ctrl.Result, error)
- func (r *BaseReconciler) ReconcileAPIServerIngress(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, svcName string, ...) error
- func (r *BaseReconciler) ReconcileAPIServerRoute(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, svcName string, ...) error
- func (r *BaseReconciler) ReconcileNamespace(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
- func (r *BaseReconciler) ReconcileUpdateClusterInfoJob(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, cfg *SharedConfig, ...) error
- func (r *BaseReconciler) ReconcileUpdateClusterInfoJobRole(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
- func (r *BaseReconciler) ReconcileUpdateClusterInfoJobRoleBinding(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
- func (r *BaseReconciler) ReconcileUpdatePostCreateHook(ctx context.Context, hcp *v1alpha1.ControlPlane) error
- func (r *BaseReconciler) UpdateStatusForSyncingError(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, result ctrl.Result, ...) (ctrl.Result, error)
- func (r *BaseReconciler) UpdateStatusForSyncingSuccess(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (ctrl.Result, error)
- func (r *BaseReconciler) UpdateStatusWithSecretRef(hcp *tenancyv1alpha1.ControlPlane, secretName, key, inClusterKey string)
- type ControlPlaneReconciler
- type PostCreateHookReconciler
- type ResourceInfo
- type SharedConfig
- type Vars
Constants ¶
const ( DefaultPort = 443 DefaultPortName = "https" SecurePort = 9444 CMHealthzPort = 10257 )
const (
FieldManager = "kubeflex"
)
const (
// field owner for all server-side applies
FieldOwner = "kubeflex.kubestellar.io"
)
const (
IngressClassNameNGINX = "nginx"
)
Variables ¶
var ErrPostCreateHookNotFound = errors.New("post create hook not found")
Functions ¶
This section is empty.
Types ¶
type BaseReconciler ¶
type BaseReconciler struct {
client.Client
Scheme *runtime.Scheme
Version string
ClientSet *kubernetes.Clientset
DynamicClient *dynamic.DynamicClient
EventRecorder record.EventRecorder
}
BaseReconciler provide common reconcilers used by other reconcilers
func (*BaseReconciler) GetAPIServerRouteURL ¶ added in v0.2.5
func (r *BaseReconciler) GetAPIServerRouteURL(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (string, error)
func (*BaseReconciler) GetConfig ¶ added in v0.2.3
func (r *BaseReconciler) GetConfig(ctx context.Context) (*SharedConfig, error)
func (*BaseReconciler) Reconcile ¶ added in v0.9.2
func (r *BaseReconciler) Reconcile(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (ctrl.Result, error)
Reconcile update syncing status to success
func (*BaseReconciler) ReconcileAPIServerIngress ¶
func (r *BaseReconciler) ReconcileAPIServerIngress(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, svcName string, svcPort int, domain string) error
func (*BaseReconciler) ReconcileAPIServerRoute ¶ added in v0.2.5
func (r *BaseReconciler) ReconcileAPIServerRoute(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, svcName string, svcPort int, domain string) error
func (*BaseReconciler) ReconcileNamespace ¶
func (r *BaseReconciler) ReconcileNamespace(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
func (*BaseReconciler) ReconcileUpdateClusterInfoJob ¶ added in v0.2.7
func (r *BaseReconciler) ReconcileUpdateClusterInfoJob(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, cfg *SharedConfig, version string) error
func (*BaseReconciler) ReconcileUpdateClusterInfoJobRole ¶ added in v0.2.7
func (r *BaseReconciler) ReconcileUpdateClusterInfoJobRole(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
func (*BaseReconciler) ReconcileUpdateClusterInfoJobRoleBinding ¶ added in v0.2.7
func (r *BaseReconciler) ReconcileUpdateClusterInfoJobRoleBinding(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) error
func (*BaseReconciler) ReconcileUpdatePostCreateHook ¶ added in v0.3.0
func (r *BaseReconciler) ReconcileUpdatePostCreateHook(ctx context.Context, hcp *v1alpha1.ControlPlane) error
ReconcileUpdatePostCreateHook is the main orchestrator that processes all post-create hooks and implements conditional completion logic based on WaitForPostCreateHooks flag
func (*BaseReconciler) UpdateStatusForSyncingError ¶
func (r *BaseReconciler) UpdateStatusForSyncingError(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane, result ctrl.Result, err error) (ctrl.Result, error)
UpdateStatusForSyncingError change EventRecorder and ControlPlane Status to sync failed
func (*BaseReconciler) UpdateStatusForSyncingSuccess ¶
func (r *BaseReconciler) UpdateStatusForSyncingSuccess(ctx context.Context, hcp *tenancyv1alpha1.ControlPlane) (ctrl.Result, error)
UpdateStatusForSyncingSuccess change EventRecorder and ControlPlane Status to success
func (*BaseReconciler) UpdateStatusWithSecretRef ¶ added in v0.2.6
func (r *BaseReconciler) UpdateStatusWithSecretRef(hcp *tenancyv1alpha1.ControlPlane, secretName, key, inClusterKey string)
UpdateStatusWithSecretRef change hcp.Status.SecretRef
type ControlPlaneReconciler ¶ added in v0.9.1
type ControlPlaneReconciler interface {
// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Reconcile(context.Context, *tenancyv1alpha1.ControlPlane) (ctrl.Result, error)
}
ControlPlaneReconciler defines Reconcile loop each controlplane type must implement ControlPlaneReconciler as internal/controller/controlplane_controller.go Reconcile acts as a reconciler factory according to a controlplane type
type PostCreateHookReconciler ¶ added in v0.9.2
type PostCreateHookReconciler interface {
ReconcileUpdatePostCreateHook(context.Context, *tenancyv1alpha1.ControlPlane) error
}
Implemented by all controlplane types for central PCH processing
type ResourceInfo ¶ added in v0.9.0
type ResourceInfo struct {
Name string
Namespace string
GVR schema.GroupVersionResource
Kind string
IsClusterScoped bool
}
ResourceInfo holds information about an applied resource for readiness checking
type SharedConfig ¶ added in v0.2.3
type SharedConfig struct {
}