Skip to content

Conversation

@mumoshu
Copy link
Collaborator

@mumoshu mumoshu commented Jul 20, 2020

This adds the JSON output on top of #221, which can be enabled by passing --output json. Internally it works exactly the same as the template output format with the default template.

********************

        Release was not present in Helm.  Diff will show entire contents as new.

********************
[{
  "api": "v1",
  "kind": "Secret",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "ConfigMap",
  "namespace": "default",
  "name": "mysql-1567775891-test",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "PersistentVolumeClaim",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "Service",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "apps",
  "kind": "Deployment",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
}]

Also note that I've modified the default template a bit so that it looks more like helm's output. See helm list -o json for example.

Ref #221 (review)

@mumoshu
Copy link
Collaborator Author

mumoshu commented Jul 20, 2020

@semoac Would you be okay with the update on the default template?

@semoac
Copy link
Contributor

semoac commented Jul 20, 2020

@semoac Would you be okay with the update on the default template?

Yes! Thank you!

This adds the JSON output on top of #221, which can be enabled by passing `--output json`. Internally it works exactly the same as the `template` output format with the default template.

```
********************

        Release was not present in Helm.  Diff will show entire contents as new.

********************
[{
  "api": "v1",
  "kind": "Secret",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "ConfigMap",
  "namespace": "default",
  "name": "mysql-1567775891-test",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "PersistentVolumeClaim",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "v1",
  "kind": "Service",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
},{
  "api": "apps",
  "kind": "Deployment",
  "namespace": "default",
  "name": "mysql-1567775891",
  "change": "ADD"
}]
```

Ref #221 (review)
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.

3 participants