Documentation ¶
Index ¶
- Constants
- Variables
- func Choose(n, k int) (*int, error)
- func HashShard(shard []string) (string, error)
- type NodeGroup
- type NodeGroupCollection
- type PodMutatingWebhook
- func (p *PodMutatingWebhook) AddFunc(obj interface{})
- func (p *PodMutatingWebhook) DeleteFunc(obj interface{})
- func (p *PodMutatingWebhook) Handle(ctx context.Context, req admission.Request) admission.Response
- func (p *PodMutatingWebhook) SetupWithManager(mgr ctrl.Manager) error
- func (p *PodMutatingWebhook) ShardExists(ctx context.Context, shardHash string) (bool, error)
- func (p *PodMutatingWebhook) ShuffleShard(ctx context.Context, tenant string, numNodeGroups int) ([]string, error)
- func (p *PodMutatingWebhook) Start(ctx context.Context) error
- func (p *PodMutatingWebhook) StartInformer(ctx context.Context) error
- func (p *PodMutatingWebhook) UpdateFunc(oldObj, newObj interface{})
- type ShuffleShardReconciler
Constants ¶
const (
PrometheusNamespace = "kube_shuffle_sharder"
)
Variables ¶
var ErrMissingNodeAutoDiscoveryLabel = errors.New("missing node-auto-discovery label")
var ErrMissingTenantLabel = errors.New("missing tenant label")
var ErrUnableToCastMeta = errors.New("unable to cast interface to object")
var ErrUnableToCastNode = errors.New("unable to cast interface to node")
Functions ¶
Types ¶
type NodeGroupCollection ¶
type PodMutatingWebhook ¶
type PodMutatingWebhook struct { Mu *sync.Mutex NodeCache NodeGroupCollection NodeGroupAutoDiscoveryLabel string TenantLabel string NumNodeGroups int Decoder *admission.Decoder // contains filtered or unexported fields }
func (*PodMutatingWebhook) AddFunc ¶
func (p *PodMutatingWebhook) AddFunc(obj interface{})
func (*PodMutatingWebhook) DeleteFunc ¶
func (p *PodMutatingWebhook) DeleteFunc(obj interface{})
func (*PodMutatingWebhook) SetupWithManager ¶
func (p *PodMutatingWebhook) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the handler with manager's webhook server and adds the informer to the list of processes for manager to start
func (*PodMutatingWebhook) ShardExists ¶
func (*PodMutatingWebhook) ShuffleShard ¶
func (*PodMutatingWebhook) Start ¶
func (p *PodMutatingWebhook) Start(ctx context.Context) error
Start fulfills the manager.Runnable interface, required when calling (manager.Manager).Add in (controller.PodMutatingWebhook).SetupWithManager
func (*PodMutatingWebhook) StartInformer ¶
func (p *PodMutatingWebhook) StartInformer(ctx context.Context) error
func (*PodMutatingWebhook) UpdateFunc ¶
func (p *PodMutatingWebhook) UpdateFunc(oldObj, newObj interface{})
type ShuffleShardReconciler ¶
ShuffleShardReconciler reconciles a ShuffleShard object
func (*ShuffleShardReconciler) Reconcile ¶
func (r *ShuffleShardReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the ShuffleShard object against the actual cluster state, and then 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.15.0/pkg/reconcile
func (*ShuffleShardReconciler) SetupWithManager ¶
func (r *ShuffleShardReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.