-
Notifications
You must be signed in to change notification settings - Fork 3.4k
dynamicconfig: detect and remove config options on delete #39303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6725a9b
to
e136d30
Compare
ConfigMap key deletions do not have entry.deleted set to true, and so are leaked on update. Add an option to capture the diff in rows between the existing table and updated rows, so that keys that need to be deleted can be calculated. Signed-off-by: jshr-w <shjayaraman@microsoft.com>
Signed-off-by: jshr-w <shjayaraman@microsoft.com>
e136d30
to
01ea19d
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a difficult to understand and use API. The problem is that TransformMany
assumed a persistent 1-to-many mapping. I would instead suggest that we make TransformMany
return a set of objects to upsert and objects to delete.
E.g. something like:
type TranformManyFunc[Obj any] func(txn statedb.ReadTxn, deleted bool, obj any) (toUpsert, toDelete []Obj)
If it is OK to you I would like to fix this myself.
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: #39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
Add a script test suite with test cases to verify that the previous commit fixes the issue of removed keys actually being deleted from the table. Issue: cilium#39303 Signed-off-by: Jussi Maki <jussi@isovalent.com>
This change enables the calculation of the diff of an existing statedb table and the values being inserted, so that the dynamicconfig reflector can detect removed options and delete them from the statedb table.
Fixes: #38621