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

kind: List combined with other manifests triggers error "Missing 'metadata' key" #251

Closed
AndiDog opened this issue Aug 14, 2020 · 3 comments · Fixed by #284
Closed

kind: List combined with other manifests triggers error "Missing 'metadata' key" #251

AndiDog opened this issue Aug 14, 2020 · 3 comments · Fixed by #284

Comments

@AndiDog
Copy link
Contributor

AndiDog commented Aug 14, 2020

$ kubeval --version
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:50Z

$ kubeval - <<EOF
---
apiVersion: v1
kind: Namespace
metadata:
  name: a
---
apiVersion: v1
kind: List
items:
  - apiVersion: v1
    kind: Namespace
    metadata:
      name: b
EOF
ERR  - stdin: Missing 'metadata' key

while kubeval fixtures/list_valid.yaml (containing only a List object and nothing else) works fine.

@mpon
Copy link
Contributor

mpon commented Sep 19, 2020

I think this problem will be fixed by #255

@ofen
Copy link

ofen commented Oct 21, 2020

I'm not sure that this related but when I'm trying to check "kind: List" with valid list of secrets I have this error.

$ helm template my-chart/ | kubeval
ERR  my-chart/templates/secret.yaml: Missing 'metadata' key

$ kubeval --version
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:29Z

@carlossg
Copy link
Collaborator

In 0.16.0 it fails with

ERR  - stdin: Failed initializing schema https://kubernetesjsonschema.dev/master-standalone/list-v1.json: Could not read schema from HTTP, response status is 404 Not Found

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

Successfully merging a pull request may close this issue.

4 participants