Documentation
¶
Index ¶
- Constants
- func NewPodEvaluator(ctx context.Context, o PodEvaluatorOptions, cl client.WithWatch, ...) (*podEvaluator, error)
- func NewPodEvaluatorRuntime(ctx context.Context, options PodEvaluatorOptions, cl client.WithWatch, ...) *podEvaluatorRuntime
- func NewPodInfo(firstResponseCh chan<- *connectionResponse) functionPodInfo
- type DockerConfig
- type Evaluator
- type PodEvaluatorOptions
Constants ¶
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 ¶
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.
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
}