1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-06 00:47:16 +01:00
Files
prometheus-operator/pkg
Simon Pasquier bdfc5ec005 fix: don't fail metadata transform on unknown types (#6298)
* 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>
2024-02-14 08:22:25 +05:30
..
2024-01-08 11:17:33 +01:00