You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
f.IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
113
113
f.BoolVar(&diff.disableOpenAPIValidation, "disable-openapi-validation", false, "disables rendered templates validation against the Kubernetes OpenAPI Schema")
114
114
f.StringVar(&diff.postRenderer, "post-renderer", "", "the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path")
115
-
f.StringVar(&diff.output, "output", "diff", "Possible values: diff, simple, template. When set to \"template\", use the env var HELM_DIFF_TPL to specify the template.")
115
+
f.StringVar(&diff.output, "output", "diff", "Possible values: diff, simple, json, template. When set to \"template\", use the env var HELM_DIFF_TPL to specify the template.")
116
116
if!isHelm3() {
117
117
f.StringVar(&diff.namespace, "namespace", "default", "namespace to assume the release to be installed into")
0 commit comments