mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
improve gvk and resid strings for error messages
This commit is contained in:
@@ -172,7 +172,7 @@ func getReplacement(nodes []*yaml.RNode, r *types.Replacement) (*yaml.RNode, err
|
||||
return nil, err
|
||||
}
|
||||
if rn.IsNilOrEmpty() {
|
||||
return nil, fmt.Errorf("fieldPath `%s` is missing for replacement source %s", r.Source.FieldPath, r.Source)
|
||||
return nil, fmt.Errorf("fieldPath `%s` is missing for replacement source %s", r.Source.FieldPath, r.Source.ResId)
|
||||
}
|
||||
|
||||
return getRefinedValue(r.Source.Options, rn)
|
||||
|
||||
@@ -269,7 +269,7 @@ spec:
|
||||
- select:
|
||||
kind: Deployment
|
||||
`,
|
||||
expectedErr: "multiple matches for selector ~G_~V_Deployment|~X|~N",
|
||||
expectedErr: "multiple matches for selector Deployment.[noVer].[noGrp]/[noName].[noNs]",
|
||||
},
|
||||
"replacement has no source": {
|
||||
input: `apiVersion: v1
|
||||
@@ -1586,7 +1586,7 @@ data:
|
||||
options:
|
||||
create: true
|
||||
`,
|
||||
expectedErr: "fieldPath `data.httpPort` is missing for replacement source ~G_~V_ConfigMap|~X|ports-from:data.httpPort",
|
||||
expectedErr: "fieldPath `data.httpPort` is missing for replacement source ConfigMap.[noVer].[noGrp]/ports-from.[noNs]",
|
||||
},
|
||||
"annotationSelector": {
|
||||
input: `apiVersion: v1
|
||||
|
||||
Reference in New Issue
Block a user