Documentation ¶
Index ¶
- Variables
- func NewMiniClusterJob(cluster *api.MiniCluster) (*batchv1.Job, error)
- type MiniClusterReconciler
- func (r *MiniClusterReconciler) Create(e event.CreateEvent) bool
- func (r *MiniClusterReconciler) Delete(e event.DeleteEvent) bool
- func (r *MiniClusterReconciler) Generic(e event.GenericEvent) bool
- func (r *MiniClusterReconciler) New(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (r *MiniClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MiniClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *MiniClusterReconciler) Update(e event.UpdateEvent) bool
- type MiniClusterUpdateWatcher
Constants ¶
This section is empty.
Variables ¶
var (
CurveCertKey = "curve.cert"
)
Functions ¶
func NewMiniClusterJob ¶
func NewMiniClusterJob(cluster *api.MiniCluster) (*batchv1.Job, error)
newMiniCluster is used to create the MiniCluster Job
Types ¶
type MiniClusterReconciler ¶
type MiniClusterReconciler struct { client.Client Scheme *runtime.Scheme Manager ctrl.Manager RESTClient rest.Interface RESTConfig *rest.Config // contains filtered or unexported fields }
MiniClusterReconciler reconciles a MiniCluster object
func NewMiniClusterReconciler ¶
func NewMiniClusterReconciler( client client.Client, scheme *runtime.Scheme, restConfig rest.Config, restClient rest.Interface, watchers ...MiniClusterUpdateWatcher, ) *MiniClusterReconciler
func (*MiniClusterReconciler) Create ¶
func (r *MiniClusterReconciler) Create(e event.CreateEvent) bool
Called when a new job is created
func (*MiniClusterReconciler) Delete ¶
func (r *MiniClusterReconciler) Delete(e event.DeleteEvent) bool
func (*MiniClusterReconciler) Generic ¶
func (r *MiniClusterReconciler) Generic(e event.GenericEvent) bool
func (*MiniClusterReconciler) New ¶
func (r *MiniClusterReconciler) New(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
Wrapper to Client.Create (New) for easier interaction
func (*MiniClusterReconciler) Reconcile ¶
func (r *MiniClusterReconciler) Reconcile( ctx context.Context, req ctrl.Request, ) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. We compare the state of the Flux object to the actual cluster state and perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile
func (*MiniClusterReconciler) SetupWithManager ¶
func (r *MiniClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*MiniClusterReconciler) Update ¶
func (r *MiniClusterReconciler) Update(e event.UpdateEvent) bool
type MiniClusterUpdateWatcher ¶
type MiniClusterUpdateWatcher interface {
NotifyMiniClusterUpdate(*api.MiniCluster)
}
This interface allows us to define a NotifyMiniClusterUpdate function