Naive pull request which seems to fix: https://github.com/bitnami/kubecfg/pull/268
The test case I added reproduced the panic pre-fix, but see below for real world example.
If, for example live has an array but the corresponding portion of config is an object:
Naive pull request which seems to fix: https://github.com/bitnami/kubecfg/pull/268 The test case I added reproduced the panic pre-fix, but see below for real world example.
If, for example
live
has an array but the corresponding portion ofconfig
is an object:To reproduce, create something with an array field, e.g.:
Then make
rules
an object instead of an array:Upon diff-strategy=subset https://github.com/bitnami/kubecfg/blob/38d6080676bdf18c02025af6775cd8b1967132a5/pkg/kubecfg/diff.go#L178-L181 finds that
config
's field is amap[string]interface{}
but live is a[]interface {}
and fails the assertion. The converse should also fail in the same manner.