`Patcher.Apply` should respect the type of the given file
Currently serializerEncode in the patcher is hard-configured to handle patching the manifests as JSON, e.g. https://github.com/weaveworks/libgitops/blob/master/pkg/util/patch/patch.go#L94. This is used by both Apply and ApplyOnFile.
There should either be a way to configure these in the patcher, or file type detection could be performed to support YAML output in the case of YAML input.
This is actually a limitation of API Machinery's StrategicMergePatch, see here: https://github.com/weaveworks/libgitops/blob/2c871bbbbf0c31630571e873a45bb914246c7488/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go#L812
So we need to work with this in Ignite. Closing.
We could add ContentType in here by automatically converting YAML to JSON whenever needed though.