allow general name and kind changes via an options field in patches

This commit is contained in:
Natasha Sarkar
2021-02-26 16:15:14 -08:00
parent bab8c34c1f
commit f96ac2d61e
17 changed files with 285 additions and 146 deletions

View File

@@ -596,6 +596,7 @@ func (m *resWrangler) ApplySmPatch(
patchCopy := patch.DeepCopy()
patchCopy.CopyMergeMetaDataFieldsFrom(patch)
patchCopy.SetGvk(res.GetGvk())
patchCopy.SetKind(patch.GetKind())
err := res.ApplySmPatch(patchCopy)
if err != nil {
// Check for an error string from UnmarshalJSON that's indicative