feat(pluginpresets): evaluate CEL expressions for owned Plugins#2088
Merged
Conversation
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
24 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves CEL ${...} expression handling for owned Plugins into the PluginPreset controller (behind a new pluginPreset.expressionEvaluationEnabled feature flag), updates the PluginPreset API to use a dedicated option value type, and refreshes docs/charts/tests accordingly.
Changes:
- Added PluginPreset-side option value expression evaluation during reconciliation (with cluster overrides applied before evaluation).
- Introduced
pluginPresetfeature flags plumbing (controller wiring + ConfigMap/chart values + unit tests). - Updated API/docs/webhook/tests to use
PluginPresetPluginOptionValueforPluginPreset.spec.plugin.optionValuesand cluster overrides.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/webhook/v1alpha1/pluginpreset_webhook.go | Converts preset option values for validation before calling shared plugin option validation. |
| internal/webhook/v1alpha1/pluginpreset_webhook_test.go | Expands webhook tests to cover Expression mutual exclusivity for presets/overrides. |
| internal/util/plugin.go | Adds conversion helpers between preset option values and plugin option values. |
| internal/test/resources.go | Updates test builders/helpers for new preset option value types. |
| internal/helm/cel.go | Exports BuildTemplateData for reuse by PluginPreset expression evaluation. |
| internal/features/features.go | Adds pluginPreset feature section and accessor. |
| internal/features/features_test.go | Adds tests for pluginPreset feature flag parsing/independence. |
| internal/controller/plugin/suite_test.go | Enables PluginPreset expression evaluation in controller test suite. |
| internal/controller/plugin/pluginpreset_values_resolver.go | Implements expression evaluation and override merging for presets. |
| internal/controller/plugin/pluginpreset_controller.go | Applies overrides + resolves expressions before writing Plugin spec optionValues. |
| internal/controller/plugin/pluginpreset_controller_test.go | Adds controller tests validating expression resolution and overrides behavior. |
| internal/cmd/plugin_template.go | Ensures template generation merges preset values after converting to plugin option values. |
| internal/cmd/plugin_template_test.go | Updates tests for new preset option value types. |
| docs/reference/components/pluginpreset.md | Documents CEL expressions for presets and the pluginPreset feature flag. |
| docs/reference/api/openapi.yaml | Updates generated OpenAPI schema descriptions for preset option values. |
| docs/reference/api/index.html | Updates generated API HTML to reflect new preset option value type references. |
| dev-env/dev.values.yaml | Enables pluginPreset.expressionEvaluationEnabled in dev env defaults. |
| cmd/greenhouse/controllers.go | Wires PluginPreset reconciler startup to the new feature flag accessor. |
| charts/manager/templates/manager/feature-flag.yaml | Adds pluginPreset section to feature flags ConfigMap template. |
| charts/manager/templates/_helpers.tpl | Adds helper for rendering pluginPreset expression evaluation flag. |
| charts/manager/crds/greenhouse.sap_pluginpresets.yaml | Updates CRD schema descriptions for preset option value type. |
| charts/manager/ci/test-values.yaml | Sets pluginPreset expression evaluation in chart CI values. |
| charts/greenhouse/values.yaml | Adds pluginPreset flag default under global. |
| charts/greenhouse/ci/test-values.yaml | Sets pluginPreset expression evaluation in greenhouse chart CI values. |
| api/v1alpha1/zz_generated.deepcopy.go | Regenerates deepcopy logic for new preset option value slice types. |
| api/v1alpha1/pluginpreset_types.go | Switches PluginPreset option values/overrides to PluginPresetPluginOptionValue. |
Files not reviewed (1)
- api/v1alpha1/zz_generated.deepcopy.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
… dev Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
abhijith-darshan
requested changes
Jun 24, 2026
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
…disabled Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
Zaggy21
approved these changes
Jun 25, 2026
abhijith-darshan
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(pluginpresets): evaluate CEL expressions for owned Plugins (#1774)
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Files for manual testing:
K1_expression_test.yaml
K2_override_expression_test.yaml
Added to documentation?
Checklist