mirror of
https://github.com/coreos/prometheus-operator.git
synced 2026-02-06 00:47:16 +01:00
* fix: don't fail metadata transform on unknown types This change modifies the `PartialObjectMetadataStrip` function to return the object unmodified if casting to `*v1.PartialObjectMetadata` fails. When the informer processes a deleted object, its type can be `cache.DeletedFinalStateUnknown`. Co-authored-by: Ayoub Mrini <amrini@redhat.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> * test: add TestPartialObjectMetadataStripOnDeletedFinalStateUnknown Co-authored-by: machine424 <ayoubmrini424@gmail.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: machine424 <ayoubmrini424@gmail.com> --------- Signed-off-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: machine424 <ayoubmrini424@gmail.com> Co-authored-by: Ayoub Mrini <amrini@redhat.com> Co-authored-by: machine424 <ayoubmrini424@gmail.com>