mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
convert PrevIds to use apiVersion instead meta
Since PrevIds uses only the apiVersion information from the metadata, change the retrieval from the full meta to just the apiVersion.
This commit is contained in:
@@ -49,11 +49,8 @@ func PrevIds(n *yaml.RNode) ([]resid.ResId, error) {
|
||||
"number of previous namespaces, " +
|
||||
"number of previous kinds not equal")
|
||||
}
|
||||
meta, err := n.GetMeta()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot parse resource metadata: %w", err)
|
||||
}
|
||||
group, version := resid.ParseGroupVersion(meta.APIVersion)
|
||||
apiVersion := n.GetApiVersion()
|
||||
group, version := resid.ParseGroupVersion(apiVersion)
|
||||
for i := range names {
|
||||
gvk := resid.Gvk{
|
||||
Group: group,
|
||||
|
||||
Reference in New Issue
Block a user