Documentation
¶
Index ¶
Constants ¶
const ( // PluginFinalizer is the finalizer added to Plugin resources to ensure JAR cleanup. PluginFinalizer = "mc.k8s.lex.la/plugin-cleanup" // AnnotationApplyNow triggers immediate update application, bypassing maintenance window. // Value should be a Unix timestamp (seconds since epoch) of when the annotation was set. // Annotations older than 5 minutes are ignored to prevent stale triggers. AnnotationApplyNow = "mc.k8s.lex.la/apply-now" )
Finalizer and annotation constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8sPodExecutor ¶ added in v1.0.0
type K8sPodExecutor struct {
// contains filtered or unexported fields
}
K8sPodExecutor implements PodExecutor using client-go remotecommand (SPDY).
func NewK8sPodExecutor ¶ added in v1.0.0
func NewK8sPodExecutor(config *rest.Config) (*K8sPodExecutor, error)
NewK8sPodExecutor creates a new PodExecutor from a rest.Config.
type PaperAPI ¶ added in v1.0.0
type PaperAPI interface {
GetPaperVersions(ctx context.Context) ([]string, error)
GetPaperBuild(ctx context.Context, ver string) (*paper.BuildInfo, error)
GetBuilds(ctx context.Context, ver string) ([]int, error)
}
PaperAPI abstracts PaperMC API operations for testability.
type PaperMCServerReconciler ¶
type PaperMCServerReconciler struct {
client.Client
Scheme *runtime.Scheme
Config *rest.Config
PaperClient PaperAPI
Solver solver.Solver
RegistryClient RegistryAPI
}
PaperMCServerReconciler reconciles a PaperMCServer object.
func (*PaperMCServerReconciler) Reconcile ¶
func (r *PaperMCServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile implements the reconciliation loop for PaperMCServer resources.
func (*PaperMCServerReconciler) SetupWithManager ¶
func (r *PaperMCServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PluginReconciler ¶
type PluginReconciler struct {
client.Client
Scheme *runtime.Scheme
PluginClient plugins.PluginClient
Solver solver.Solver
}
PluginReconciler reconciles a Plugin object.
func (*PluginReconciler) Reconcile ¶
Reconcile implements the reconciliation loop for Plugin resources.
func (*PluginReconciler) SetupWithManager ¶
func (r *PluginReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PodExecutor ¶ added in v1.0.0
type PodExecutor interface {
ExecInPod(ctx context.Context, namespace, podName, container string, command []string) ([]byte, error)
}
PodExecutor executes commands inside Kubernetes pods.
type RegistryAPI ¶ added in v1.0.0
type RegistryAPI interface {
ListTags(ctx context.Context, repository string, pageSize int) ([]string, error)
ImageExists(ctx context.Context, repository, tag string) (bool, error)
}
RegistryAPI abstracts Docker registry operations for testability.
type UpdateReconciler ¶
type UpdateReconciler struct {
client.Client
Scheme *runtime.Scheme
PaperClient PaperAPI
PluginClient plugins.PluginClient
PodExecutor PodExecutor
// contains filtered or unexported fields
}
UpdateReconciler reconciles PaperMCServer resources for scheduled updates.
func (*UpdateReconciler) Reconcile ¶
Reconcile reconciles PaperMCServer resources for update management.
func (*UpdateReconciler) SetCron ¶
func (r *UpdateReconciler) SetCron(scheduler mccron.Scheduler)
SetCron sets the cron scheduler for the reconciler.
func (*UpdateReconciler) SetupWithManager ¶
func (r *UpdateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.