podevaluator

package
v1.6.4-pre.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 52 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultGRPCPort = 9447

Variables

This section is empty.

Functions

func NewPodEvaluator

func NewPodEvaluator(ctx context.Context, o PodEvaluatorOptions, cl client.WithWatch, functionConfigStore *fnconf.FunctionConfigStore) (*podEvaluator, error)

func NewPodEvaluatorRuntime

func NewPodEvaluatorRuntime(ctx context.Context, options PodEvaluatorOptions, cl client.WithWatch, functionConfigStore *fnconf.FunctionConfigStore) *podEvaluatorRuntime

func NewPodInfo

func NewPodInfo(firstResponseCh chan<- *connectionResponse) functionPodInfo

Types

type DockerConfig

type DockerConfig struct {
	Auths map[string]authn.AuthConfig `json:"auths"`
}

DockerConfig represents the structure of Docker config.json

type Evaluator

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

Evaluator is the in-process pod evaluator plus its FunctionEvaluator gRPC front-end. porch-server uses one instance for Engine renders and for the PackageRevision controller.

func NewEvaluator

func NewEvaluator(ctx context.Context, o PodEvaluatorOptions, cl client.WithWatch, functionConfigStore *fnconf.FunctionConfigStore) (*Evaluator, error)

NewEvaluator creates the pod evaluator used by porch-server.

func (*Evaluator) ListenGRPC

func (e *Evaluator) ListenGRPC(addr string) (net.Listener, error)

ListenGRPC binds the FunctionEvaluator TCP address. Bind here so port collisions fail Engine startup instead of being logged from a goroutine.

func (*Evaluator) Runtime

func (e *Evaluator) Runtime() fn.FunctionRuntime

Runtime returns the Engine FunctionRuntime backed by this evaluator.

func (*Evaluator) ServeGRPC

func (e *Evaluator) ServeGRPC(ctx context.Context, lis net.Listener, maxMsgSize int) error

ServeGRPC exposes the same FunctionEvaluator service Function Runner used to serve. The controller sends EvaluateFunction here (image + ResourceList, no exec_path) the way it previously sent requests to Function Runner. lis must already be bound (see ListenGRPC).

type PodEvaluatorOptions

type PodEvaluatorOptions struct {
	PodNamespace               string        // Namespace to run KRM functions pods in
	WrapperServerImage         string        // Container image name of the wrapper server
	GRPCPort                   int           // FunctionEvaluator listen port; 0 uses DefaultGRPCPort
	GcScanInterval             time.Duration // Time interval between Garbage Collector scans
	PodTTL                     time.Duration // Time-to-live for pods before GC
	WarmUpPodCacheOnStartup    bool          // If true, pre-create pods for FunctionConfig podExecutor images at startup
	EnablePrivateRegistries    bool          // If true enables the use of private registries and their authentication
	RegistryAuthSecretPath     string        // The path of the secret used for authenticating to custom registries
	RegistryAuthSecretName     string        // The name of the secret used for authenticating to custom registries
	EnablePrivateRegistriesTls bool          // If enabled, will prioritize use of user provided TLS secret when accessing registries
	TlsSecretPath              string        // The path of the secret used in tls configuration
	MaxGrpcMessageSize         int           // Maximum size of grpc messages in bytes
	DefaultImagePrefix         string        // Default image prefix to use when no prefix is given for an image
	MaxWaitlistLength          int           // Maximum waitlist length per pod
	MaxParallelPodsPerFunction int           // Maximum parallel pods per function
	MaxGrpcRetries             int           // Maximum number of retries on gRPC Unavailable errors
}

Jump to

Keyboard shortcuts

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