Use Go types to extract PodTemplateSpec
This MR uses concrete Go types instead of relying on ObjectMeta.Kind
to retrieve PodTemplateSpec
of Deployments and StatefulSets. This is more robust and can perform on situations when ObjectMeta.Kind
is empty, e.g. when the object is created programmatically.
I ran into a series of unexpected errors when testing !489 (merged).