Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extraneous fields errors for several yml files #202

Open
jayunit100 opened this issue Feb 23, 2018 · 4 comments
Open

extraneous fields errors for several yml files #202

jayunit100 opened this issue Feb 23, 2018 · 4 comments

Comments

@jayunit100
Copy link

Latest release, I'm seeing

➜  install git:(installer-prometh) ✗ cat openshift/openshift-perceiver.yaml| ./short_linux_amd64 --verbose-errors  -
Error: converting stdin: extraneous fields (typos?) at paths: $.metadata

This is happening for every yaml file in https://github.com/blackducksoftware/perceptor/constrib/
for example:
https://github.com/blackducksoftware/perceptor/blob/master/contrib/install/openshift/openshift-perceiver.yaml

@jayunit100
Copy link
Author

jayunit100 commented Feb 23, 2018

Stateless reproducer:

➜   curl https://raw.githubusercontent.com/blackducksoftware/perceptor/master/contrib/install/openshift/openshift-perceiver.yaml | ./short_linux_amd64 -

Results in :

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1719  100  1719    0     0   9504      0 --:--:-- --:--:-- --:--:--  9550
Use flag '--verbose-errors' for more detailed error info.
Error: converting stdin: extraneous fields (typos?) at paths: $.metadata

@wlan0
Copy link
Member

wlan0 commented Feb 26, 2018

I believe this is because the input is a List Resource. Will test it and get back to you shortly.

@wlan0
Copy link
Member

wlan0 commented Feb 26, 2018

Hmmm, Looking into this more - looks like List type (untyped) in Kubernetes does not have ObjectMeta field. (https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/internalversion/types.go#L64)

metadata support for List types are limited.

If you're using a typed List such as PodList, metadata is of type ListMeta, which doesn't take in name. It only takes in

resourceVersion
continue

Here's the PodList type definition -
https://github.com/kubernetes/api/blob/master/core/v1/types.go#L3115

Here's the ListMeta type definition -
https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/types.go#L60:6

This leads to my next question, does the resource definition work on OpenShift? or on any other Kubernetes cluster? (without going through the short conversion)

@jayunit100
Copy link
Author

ahhh yeah ok !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants