package podchooser

import "github.com/docker/buildx/driver/kubernetes/podchooser"

Index

Functions

func ListRunningPods

func ListRunningPods(ctx context.Context, client clientcorev1.PodInterface, depl *appsv1.Deployment) ([]*corev1.Pod, error)

Types

type PodChooser

type PodChooser interface {
	ChoosePod(ctx context.Context) (*corev1.Pod, error)
}

type RandomPodChooser

type RandomPodChooser struct {
	RandSource rand.Source
	PodClient  clientcorev1.PodInterface
	Deployment *appsv1.Deployment
}

func (*RandomPodChooser) ChoosePod

func (pc *RandomPodChooser) ChoosePod(ctx context.Context) (*corev1.Pod, error)

type StickyPodChooser

type StickyPodChooser struct {
	Key        string
	PodClient  clientcorev1.PodInterface
	Deployment *appsv1.Deployment
}

func (*StickyPodChooser) ChoosePod

func (pc *StickyPodChooser) ChoosePod(ctx context.Context) (*corev1.Pod, error)

Source Files

podchooser.go

Version
v0.22.0 (latest)
Published
Mar 17, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
3 weeks ago

Tools for package owners.