Also realised while implementing this that we need to pass objects around rather than metav1.Objects, so I moved everything to passing round our object type.
The object type is just an interface wrapping metav1.Object and runtime.Object meaning we can use it to access all the metadata we need and also send updates to the API using the Client provided by controller-runtime
Added another test for this method.
Also realised while implementing this that we need to pass
object
s around rather thanmetav1.Object
s, so I moved everything to passing round ourobject
type.The
object
type is just an interface wrappingmetav1.Object
andruntime.Object
meaning we can use it to access all the metadata we need and also send updates to the API using the Client provided by controller-runtime