Move podevaluator to porch-server - #1119
Conversation
✅ Deploy Preview for kpt-porch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR relocates the pod-based KRM function evaluator (“podevaluator”) so it’s hosted/registered from porch-server instead of the separate function-runner process, reducing one gRPC hop in typical pipelines and updating the surrounding runtime/config plumbing accordingly.
Changes:
- Registers a new pod evaluator runtime in
porch-server’s engine setup (while keeping builtin/executable/pod ordering) and updates deployments/RBAC for the new ownership. - Updates the gRPC runtime/executable-evaluator contract to pass an explicit
exec_pathover gRPC for executable functions. - Introduces a dedicated OCI image parsing/util package and adapts function-config cache matching to use it.
Reviewed changes
Copilot reviewed 34 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/suiteutils/suite_utils.go | Updates e2e helper to discover pod-namespace args from porch-server container. |
| test/e2e/api/metrics_test.go | Adjusts metrics expectations for wrapper-server metrics scraping. |
| pkg/util/image/types.go | Adds parsed image representation and helpers. |
| pkg/util/image/resolve.go | Adds default image-prefix resolver helper. |
| pkg/util/image/regex.go | Adds registry-detection regex (sourced from regclient). |
| pkg/util/image/image.go | Adds image parsing/joining + semver matching utilities. |
| pkg/util/image/image_test.go | Adds unit tests for image parsing and semver helpers. |
| pkg/engine/podevaluator/testdata/config.yaml | Adds podevaluator test data config of function images. |
| pkg/engine/podevaluator/testdata/config_bad_format.yaml | Adds negative test data config (bad YAML format). |
| pkg/engine/podevaluator/podmanager.go | Moves podevaluator podmanager into the podevaluator package. |
| pkg/engine/podevaluator/podmanager_unit_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podevaluator.go | Adds podEvaluatorRuntime (fn runtime integration) and switches package name. |
| pkg/engine/podevaluator/podevaluator_unit_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podevaluator_tag_resolution_test.go | Updates tests and adds default image prefix constant. |
| pkg/engine/podevaluator/podevaluator_porch_parallel_execution_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podevaluator_podmanager_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podevaluator_podcachemanager_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podcachemanager.go | Moves pod cache manager into the podevaluator package. |
| pkg/engine/podevaluator/podcachemanager_unit_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/podevaluator/podcachemanager_eventloop_test.go | Updates tests for new podevaluator package name. |
| pkg/engine/options.go | Adds engine option to register the pod evaluator runtime; adjusts gRPC runtime option signature. |
| pkg/engine/grpcruntime.go | Extends grpc runtime to resolve executable binaries via FunctionConfigStore and pass ExecPath. |
| pkg/engine/grpcruntime_test.go | Updates grpc runtime tests for new binary-cache resolution and exec_path. |
| pkg/cmd/server/start.go | Wires podevaluator/executable options into porch-server config/flags and env. |
| pkg/apiserver/apiserver.go | Registers pod evaluator runtime in engine wiring and scopes controller-runtime cache to pod namespace. |
| go.mod | Marks sigs.k8s.io/cli-utils as indirect. |
| func/server/server.go | Removes pod runtime from function-runner; retains only executable evaluator and max gRPC size. |
| func/internal/executableevaluator.go | Changes executable evaluator to require/validate exec_path and execute that binary. |
| func/internal/executableevaluator_test.go | Updates tests to match exec_path behavior and new image util usage. |
| func/evaluator/evaluator.proto | Adds exec_path field to EvaluateFunctionRequest. |
| func/evaluator/evaluator.pb.go | Regenerates protobuf bindings to include ExecPath. |
| deployments/porch/6-rbac-bind.yaml | Grants function-executor role binding to porch-server SA. |
| deployments/porch/3-porch-server.yaml | Sets WRAPPER_SERVER_IMAGE env and adds podevaluator/executable flags to porch-server. |
| deployments/porch/2-function-runner.yaml | Removes pod evaluator flags/env from function-runner deployment. |
| controllers/functionconfigs/reconciler/functionconfigreconciler.go | Refactors image/tag matching and semver constraint handling using new image util. |
| controllers/functionconfigs/reconciler/functionconfigreconciler_test.go | Removes function-runner finalizer cases. |
| api/porchconfig/v1alpha1/function_config_types.go | Removes function-runner observed generation from FunctionConfig status/printcolumns. |
| api/generated/crds/config.porch.kpt.dev_functionconfigs.yaml | Regenerates CRD to remove function-runner observed generation status/printcolumns. |
Files not reviewed (1)
- func/evaluator/evaluator.pb.go: Generated file
Comments suppressed due to low confidence (1)
pkg/engine/podevaluator/podevaluator.go:166
- podevalRunner.Run ignores the runner's context and calls EvaluateFunction with context.Background(). This drops cancellation/deadline propagation from the engine (e.g. request timeout), which can leak work and make shutdowns slower.
a4bc310 to
00f26e4
Compare
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
00f26e4 to
16dc936
Compare
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
a03a5e5 to
8572267
Compare
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
efiacor
left a comment
There was a problem hiding this comment.
We will need doc updates around this for sure as it's an arch change.
|
@dgyorgy-nokia rebase required |
|
Would need some documentation. |
|
/dosu-refresh |
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>
eef75bb to
dae2a27
Compare
|
efiacor
left a comment
There was a problem hiding this comment.
Thanks for adding the documentation.
Could we add at least one crd e2e test that exercises the pod evaluator in the controller?
Signed-off-by: Daniel Gyorgy <daniel.gyorgy@nokia.com>


[Move podevaluator to porch-server]
Description
Related Issue(s)
Type of Change
Checklist
AI Disclosure
If so, please describe how: