shell-operator icon indicating copy to clipboard operation
shell-operator copied to clipboard

Accessing old object on `watchEvent`

Open mhkarimi1383 opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe.

Describe the solution you'd like to see a field called oldObject just like object

Describe alternatives you've considered using validation webhooks

Additional context

mhkarimi1383 avatar Jul 15 '23 18:07 mhkarimi1383

@mhkarimi1383 hello! Could you please elaborate? This is not clear in which case do you want to receive an old object. Only for validating? What do you want to validate then?

nabokihms avatar Jul 15 '23 19:07 nabokihms

@nabokihms, Hi, I'm working on this PR on my project, https://github.com/mhkarimi1383/reflector/pull/3

As you can see I want to have old object to compare changes when Object is Modified

mhkarimi1383 avatar Jul 15 '23 19:07 mhkarimi1383

Got it. Thanks for the explanation.

nabokihms avatar Jul 16 '23 12:07 nabokihms

Any updates on this?

mhkarimi1383 avatar Jul 20 '23 06:07 mhkarimi1383

This feature is currently not in our roadmap, so probably no one from the team will pick it up in the nearest future.

Yet we are always welcome for contributions!

nabokihms avatar Jul 20 '23 06:07 nabokihms

@nabokihms I have made a PR that will fix this I think

mhkarimi1383 avatar Jul 24 '23 06:07 mhkarimi1383