-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Summary
The eno.azure.io/overrides
annotation in ConfigMap resources is not working as expected when using the CEL double()
function in the condition. The override condition is being ignored, causing ENO to reset user-modified values back to the default even when the condition should prevent this behavior.
Current Behavior
When a user patches the some-field-name
field to a value ≤ 0.01 using kubectl, ENO reconciles and resets the value back to the default 0.0025
, despite the override condition that should prevent this.
Expected Behavior
The override condition should prevent ENO from resetting the value when all the following conditions evaluate to true:
- The field
some-field-name
is not null - The path is not managed by ENO (
!pathManagedByEno
) - The numeric value is ≤ 0.01 (
double(self.data['some-field-name']) <= 0.01
)
Reproduction Steps
-
Apply the test ConfigMap with the current configuration:
apiVersion: v1 kind: ConfigMap metadata: name: test-config annotations: eno.azure.io/overrides: | [ { "path": "self.data['some-field-name']", "value": null, "condition": "self.data['some-field-name'] != null && !pathManagedByEno && double(self.data['some-field-name']) <= 0.01" } ] data: some-field-name: "0.0025"
-
Patch the field to a value ≤ 0.01:
kubectl patch configmap test-config -n kube-system --type='merge' -p='{"data":{"some-field-name":"0.005"}}'
-
Wait for ENO to reconcile
-
Observe that the value is reset to
0.0025
instead of preserving the user's0.005
value
Root Cause Analysis
The issue appears to be related to the use of the CEL double()
function in the condition. Possible causes:
- ENO may not properly support or evaluate the
double()
CEL function - String-to-numeric conversion may be failing silently
- CEL expression evaluation context may not include the
double()
function
Impact
- User Impact: Users cannot override the
some-field-name
value, limiting customization capabilities - Workaround: None currently available through standard kubectl operations
Additional Context
- This is a customer-facing configuration that should allow overrides
- The issue specifically affects double types, suggesting the numeric comparison logic is the problem
Environment
- AKS Version: v2.32.6
- ENO Version: v0.1.27
Next Steps
- Investigate ENO's CEL function support and documentation
- Test alternative condition syntaxes
- Consider adding integration tests for ENO override conditions
- Update documentation if CEL function limitations exist