-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
E.g. tailor export rolebinding -n foo-dev might fail with:
2019/10/07 16:06:03 Could not export Kinds: [RoleBinding], Name: , Label: , ExcludedKinds: [], ExcludedNames: [], ExcludedLabels: [] resources as template: Could not parse object of exported template: Object has no key 'name'
The reason is that
Lines 124 to 128 in 1fff4cf
| namePointer, _ := gojsonpointer.NewJsonPointer("/metadata/name") | |
| name, _, err := namePointer.Get(m) | |
| if err != nil { | |
| return err | |
| } |
/metadata/name to exist, however some resources might not have it, e.g.:
- apiVersion: authorization.openshift.io/v1
groupNames: null
kind: RoleBinding
metadata:
creationTimestamp: null
generateName: system:image-pusher-
roleRef:
name: system:image-pusher
subjects:
- kind: ServiceAccount
name: default
namespace: foo-dev
userNames:
- system:serviceaccount:foo-dev:default
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working