Documentation
¶
Index ¶
- Constants
- func GetFakeClientBuilderWithIndexers() (*fake.ClientBuilder, error)
- func GetPodBySandboxID(ctx context.Context, c client.Client, sandboxID string) (*corev1.Pod, error)
- func IndexerFuncPodTeam(obj client.Object) []string
- func IndexerFuncPodUser(obj client.Object) []string
- func IndexerFuncPoolTeam(obj client.Object) []string
- func IndexerFuncPoolUser(obj client.Object) []string
- func IndexerFuncSandboxID(obj client.Object) []string
- func IndexerFuncSandboxPhase(obj client.Object) []string
- func IndexerFuncSandboxPool(obj client.Object) []string
- func IndexerFuncSandboxPoolPhase(obj client.Object) []string
- func ListIdlePodsForPool(ctx context.Context, c client.Client, namespace, poolName string) ([]corev1.Pod, error)
- func ListPodsBySandboxPool(ctx context.Context, c client.Client, namespace, poolName string) ([]corev1.Pod, error)
- func ListPodsBySandboxPoolAndPhase(ctx context.Context, c client.Client, namespace, poolName, phase string) ([]corev1.Pod, error)
- func ListSandboxPoolsByTeamUser(ctx context.Context, c client.Client, namespace, team, user string) ([]agentsv1alpha1.SandboxPool, error)
- func SandboxPoolPhaseIndexValue(poolName, phase string) string
- func SetupIndexers(ctx context.Context, mgr ctrl.Manager) error
Constants ¶
const ( // Pod indexes IndexFieldSandboxID = indexFieldPrefix + agentsv1alpha1.SandboxIDLabelKey IndexFieldSandboxPool = indexFieldPrefix + agentsv1alpha1.SandboxPoolLabelKey IndexFieldSandboxPhase = indexFieldPrefix + agentsv1alpha1.SandboxPhaseLabelKey // IndexFieldSandboxPoolPhase is a composite index combining pool name and phase, // stored as "poolName\x00phase" (NUL-byte separated to avoid collisions). // Use ListIdlePodsForPool() or SandboxPoolPhaseIndexValue() to query. IndexFieldSandboxPoolPhase = indexFieldPrefix + "sandbox-pool-phase" // Team/User indexes — shared across Pod and SandboxPool IndexFieldTeam = indexFieldPrefix + agentsv1alpha1.LabelTeam IndexFieldUser = indexFieldPrefix + agentsv1alpha1.LabelUser )
Variables ¶
This section is empty.
Functions ¶
func GetFakeClientBuilderWithIndexers ¶
func GetFakeClientBuilderWithIndexers() (*fake.ClientBuilder, error)
func GetPodBySandboxID ¶
func IndexerFuncPodTeam ¶
IndexerFuncPodTeam indexes a Pod by its scheduling team label.
func IndexerFuncPodUser ¶
IndexerFuncPodUser indexes a Pod by its scheduling user label.
func IndexerFuncPoolTeam ¶
IndexerFuncPoolTeam indexes a SandboxPool by its scheduling team label.
func IndexerFuncPoolUser ¶
IndexerFuncPoolUser indexes a SandboxPool by its scheduling user label.
func IndexerFuncSandboxID ¶
func IndexerFuncSandboxPhase ¶
func IndexerFuncSandboxPool ¶
func IndexerFuncSandboxPoolPhase ¶
IndexerFuncSandboxPoolPhase returns the composite "poolName\x00phase" value, enabling efficient single-index queries for a specific pool+phase combination.
func ListIdlePodsForPool ¶
func ListIdlePodsForPool(ctx context.Context, c client.Client, namespace, poolName string) ([]corev1.Pod, error)
ListIdlePodsForPool uses the composite pool+phase index for an efficient single-index query returning only idle pods in the given pool.
func ListPodsBySandboxPool ¶
func ListSandboxPoolsByTeamUser ¶
func ListSandboxPoolsByTeamUser(ctx context.Context, c client.Client, namespace, team, user string) ([]agentsv1alpha1.SandboxPool, error)
ListSandboxPoolsByTeamUser returns all SandboxPools in the given namespace that match both team and user labels. Pass empty strings to skip a filter. When namespace is empty, the search spans all namespaces.
func SandboxPoolPhaseIndexValue ¶
SandboxPoolPhaseIndexValue builds the composite index lookup value.
Types ¶
This section is empty.