Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Print resource Kind/name when multiple YAML documents in same file #71

Open
paulreimer opened this issue Nov 15, 2018 · 0 comments
Open

Comments

@paulreimer
Copy link

I use kustomize [https://github.com/kubernetes-sigs/kustomize], which takes many YAML manifest files (optionally overriding certain fields via other files), and then generates a single YAML file output (with multiple documents separated by ---).

If I point kubediff at this mega-YAML it prints out the differences at the file-level, which is unhelpful since I get all my errors collected under this file.

e.g.:

{
  "dev-all.yaml": [
    ".spec.selector: 'name' missing",
    ".metadata.labels: 'name' missing",
    ".spec.selector: 'name' missing",
    ".metadata.labels: 'name' missing",
    ".spec.template.spec.containers: 'element [0]' missing",
    ".spec.template.spec.containers: 'element [0]' missing"
  ]
}

I would like to know the resource kind/name from the offending resources when a diff is printed (e.g. deployment/foobar, deployment/barbar)

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

No branches or pull requests

1 participant