Skip to content

Conversation

@tqorange
Copy link
Contributor

This PR adds support for yaml files with a list of k8s objects in them, for example:

apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: cf-one
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: cf-two

config.FileName = test
results, _ := Validate(fileContents, config)
if len(results[0].Errors) == 0 {
errorCount := 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this was intentional, but this was only checking the first result. My fixture yaml initially failed this test.

@tqorange tqorange changed the title Add support for a list k8s objects Add support for a list of k8s objects Mar 11, 2020
@garethr
Copy link
Collaborator

garethr commented Apr 14, 2020

Thanks, much appreciated. I'll get this into the next release.

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 this pull request may close these issues.

2 participants