JSON output doesn't say which object is mis-matched
gbonk opened this issue · 4 comments
gbonk commented
using the version I cloned from github today ( 2020-02-26 ) and performing a kubediff without the -j
flag the output tells me what object is not matched up.
## /source-vars-7hfkggft52 (ConfigMap.v1.)
.metadata.annotations.scm-sha: 'cd59a385c4dadcef8a8e60aaa14fd53fbe58dd6d' != '2d109564509611cdea1a0412953e0a6b829f632a'
But when I add the -j
flag, I'm shown there us a mis-match but the object ( source-vars-7hfkggft52 ) isn't mentioned.
{
"infrastructure.yaml": [
".metadata.annotations.scm-sha: 'cd59a385c4dadcef8a8e60aaa14fd53fbe58dd6d' != '2d109564509611cdea1a0412953e0a6b829f632a'"
]
}
imjoseangel commented
I vote for a common output in both json and standard like:
{
"Deployment.v1.apps": [
{
"difference": ".spec.replicas: '1' != '3'",
"name": "default/kubediff-app",
"path": "tests/e2e/success/k8s-deployment.yaml"
}
]
Deployment.v1.apps
Difference: .spec.replicas: '1' != '3'
Name: default/kubediff-app
Path: tests/e2e/success/k8s-deployment.yaml
@dholbach What do you think?
dholbach commented
A common output sounds great, also if we include all relevant information and make it easy to parse.
I just wonder how we can make it so that we don't change the output format under people's existing scripts.
imjoseangel commented
I think we can keep the one we have and add some flags for extended ones 😄
dholbach commented
Yes, sounds good to me!