fix: prioritize ConfigMap over built-in Lua configurations#326
fix: prioritize ConfigMap over built-in Lua configurations#326Hadyaziz05 wants to merge 1 commit intoopenkruise:masterfrom
Conversation
The default Lua configuration for Istio DestinationRule contains hardcoded values (e.g., 'gray' label) that could not be overridden by users. This was because getLuaScript() checked built-in scripts first, making the ConfigMap fallback unreachable. Changes: - Reversed script loading order: ConfigMap → built-in (was: built-in → ConfigMap) - Users can now override hardcoded values via kruise-rollout-configuration ConfigMap - Added TestGetLuaScriptPriority to verify ConfigMap takes precedence - All existing tests pass with no regressions Fixes the issue where users couldn't change hardcoded Lua values like 'istio.service.tag=gray' to custom values such as 'canary'.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Hadyaziz05! It looks like this is your first PR to openkruise/rollouts 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #326 +/- ##
==========================================
+ Coverage 51.38% 51.42% +0.04%
==========================================
Files 66 66
Lines 8559 8556 -3
==========================================
+ Hits 4398 4400 +2
+ Misses 3575 3573 -2
+ Partials 586 583 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The default Lua configuration for Istio DestinationRule contains hardcoded values (e.g., 'gray' label) that could not be overridden by users. This was because getLuaScript() checked built-in scripts first, making the ConfigMap fallback unreachable.
Changes:
Fixes the issue where users couldn't change hardcoded Lua values like 'istio.service.tag=gray' to custom values such as 'canary'.
Fixes #322