testing

package
v0.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterInformerFactory

func NewClusterInformerFactory(clusterClient clusterclient.Interface, objects ...runtime.Object) clusterinformers.SharedInformerFactory

func NewClusterSetBinding

func NewClusterSetBinding(namespace, clusterSetName string) *clusterapiv1beta2.ManagedClusterSetBinding

func PlacementDecisionName added in v0.12.0

func PlacementDecisionName(placementName string, index int) string

Types

type AddOnPlacementScoreBuilder added in v0.12.0

type AddOnPlacementScoreBuilder struct {
	// contains filtered or unexported fields
}

func NewAddOnPlacementScore

func NewAddOnPlacementScore(clusternamespace, name string) *AddOnPlacementScoreBuilder

func (*AddOnPlacementScoreBuilder) Build added in v0.12.0

func (*AddOnPlacementScoreBuilder) WithScore added in v0.12.0

func (*AddOnPlacementScoreBuilder) WithValidUntil added in v0.12.0

func (a *AddOnPlacementScoreBuilder) WithValidUntil(validUntil time.Time) *AddOnPlacementScoreBuilder

type FakePluginHandle

type FakePluginHandle struct {
	// contains filtered or unexported fields
}

func NewFakePluginHandle

func NewFakePluginHandle(
	t *testing.T, client *clusterfake.Clientset, objects ...runtime.Object) *FakePluginHandle

func (*FakePluginHandle) ClusterClient

func (f *FakePluginHandle) ClusterClient() clusterclient.Interface

func (*FakePluginHandle) ClusterLister

func (*FakePluginHandle) DecisionLister

func (*FakePluginHandle) EventRecorder

func (f *FakePluginHandle) EventRecorder() kevents.EventRecorder

func (*FakePluginHandle) MetricsRecorder added in v0.13.0

func (f *FakePluginHandle) MetricsRecorder() *metrics.ScheduleMetrics

func (*FakePluginHandle) ScoreLister

type ManagedClusterBuilder added in v0.12.0

type ManagedClusterBuilder struct {
	// contains filtered or unexported fields
}

func NewManagedCluster

func NewManagedCluster(clusterName string) *ManagedClusterBuilder

func (*ManagedClusterBuilder) Build added in v0.12.0

func (*ManagedClusterBuilder) WithClaim added in v0.12.0

func (b *ManagedClusterBuilder) WithClaim(name, value string) *ManagedClusterBuilder

func (*ManagedClusterBuilder) WithLabel added in v0.12.0

func (b *ManagedClusterBuilder) WithLabel(name, value string) *ManagedClusterBuilder

func (*ManagedClusterBuilder) WithResource added in v0.12.0

func (b *ManagedClusterBuilder) WithResource(resourceName clusterapiv1.ResourceName, allocatable, capacity string) *ManagedClusterBuilder

func (*ManagedClusterBuilder) WithTaint added in v0.12.0

type ManagedClusterSetBuilder added in v0.12.0

type ManagedClusterSetBuilder struct {
	// contains filtered or unexported fields
}

func NewClusterSet

func NewClusterSet(clusterSetName string) *ManagedClusterSetBuilder

func (*ManagedClusterSetBuilder) Build added in v0.12.0

func (*ManagedClusterSetBuilder) WithClusterSelector added in v0.12.0

type PlacementBuilder added in v0.12.0

type PlacementBuilder struct {
	// contains filtered or unexported fields
}

func NewPlacement

func NewPlacement(namespace, name string) *PlacementBuilder

func NewPlacementWithAnnotations

func NewPlacementWithAnnotations(namespace, name string, annotations map[string]string) *PlacementBuilder

func (*PlacementBuilder) AddPredicate added in v0.12.0

func (b *PlacementBuilder) AddPredicate(labelSelector *metav1.LabelSelector, claimSelector *clusterapiv1beta1.ClusterClaimSelector) *PlacementBuilder

func (*PlacementBuilder) AddToleration added in v0.12.0

func (b *PlacementBuilder) AddToleration(toleration *clusterapiv1beta1.Toleration) *PlacementBuilder

func (*PlacementBuilder) Build added in v0.12.0

func (*PlacementBuilder) WithClusterSets added in v0.12.0

func (b *PlacementBuilder) WithClusterSets(clusterSets ...string) *PlacementBuilder

func (*PlacementBuilder) WithDeletionTimestamp added in v0.12.0

func (b *PlacementBuilder) WithDeletionTimestamp() *PlacementBuilder

func (*PlacementBuilder) WithGroupStrategy added in v0.12.0

func (b *PlacementBuilder) WithGroupStrategy(groupStrategy clusterapiv1beta1.GroupStrategy) *PlacementBuilder

func (*PlacementBuilder) WithMisconfiguredCondition added in v0.12.0

func (b *PlacementBuilder) WithMisconfiguredCondition(status metav1.ConditionStatus) *PlacementBuilder

func (*PlacementBuilder) WithNOC added in v0.12.0

func (b *PlacementBuilder) WithNOC(noc int32) *PlacementBuilder

func (*PlacementBuilder) WithNumOfSelectedClusters added in v0.12.0

func (b *PlacementBuilder) WithNumOfSelectedClusters(nosc int, placementName string) *PlacementBuilder

func (*PlacementBuilder) WithPrioritizerConfig added in v0.12.0

func (b *PlacementBuilder) WithPrioritizerConfig(name string, weight int32) *PlacementBuilder

func (*PlacementBuilder) WithPrioritizerPolicy added in v0.12.0

func (*PlacementBuilder) WithSatisfiedCondition added in v0.12.0

func (b *PlacementBuilder) WithSatisfiedCondition(numbOfScheduledDecisions, numbOfUnscheduledDecisions int) *PlacementBuilder

func (*PlacementBuilder) WithScoreCoordinateAddOn added in v0.12.0

func (b *PlacementBuilder) WithScoreCoordinateAddOn(resourceName, scoreName string, weight int32) *PlacementBuilder

func (*PlacementBuilder) WithUID added in v0.12.0

func (b *PlacementBuilder) WithUID(uid string) *PlacementBuilder

type PlacementDecisionBuilder added in v0.12.0

type PlacementDecisionBuilder struct {
	// contains filtered or unexported fields
}

func NewPlacementDecision

func NewPlacementDecision(namespace, name string) *PlacementDecisionBuilder

func (*PlacementDecisionBuilder) Build added in v0.12.0

func (*PlacementDecisionBuilder) WithController added in v0.12.0

func (*PlacementDecisionBuilder) WithDecisions added in v0.12.0

func (b *PlacementDecisionBuilder) WithDecisions(clusterNames ...string) *PlacementDecisionBuilder

func (*PlacementDecisionBuilder) WithDeletionTimestamp added in v0.12.0

func (b *PlacementDecisionBuilder) WithDeletionTimestamp() *PlacementDecisionBuilder

func (*PlacementDecisionBuilder) WithLabel added in v0.12.0

func (b *PlacementDecisionBuilder) WithLabel(name, value string) *PlacementDecisionBuilder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL