kubernetes/pkg/kubelet/apis
obitech bba15d358c Add strict deserialization for kubelet component config
CodecFactory is started with EnableStrict that throws an error when deserializing
a Kubelet component config that is malformed (e.g. unknown or duplicate keys).

When strict decoding a v1beta1 config fails, non-strict decoding is used and a warning is emitted.
For this, NewSchemeAndCodecs is now a variadic function that can take multiple
arguments for augmenting the returned codec factory. Strict decoding is
then explicitely enabled when decoding a kubelet config.
Additionally, decoding a RemoteConfigSource needs to be non-strict
to avoid an accidental error when it contains newer API fields that are not
yet known to the Kubelet.

DecodeKubeletConfiguration returns a wrapped error instead of a simple string
so its type can be tested.

Add unit tests for unhappy paths when loading a component config

Add keys for test cases struct fields, remove nil field initialization

Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>
2019-10-24 19:37:35 +02:00
..
config Add strict deserialization for kubelet component config 2019-10-24 19:37:35 +02:00
podresources Clean up error messages (ST1005) 2019-08-21 10:40:21 -07:00
resourcemetrics add dashpole to kubelet owners files 2019-05-29 13:33:48 -07:00
stats Fix misc static check issues 2019-08-21 10:40:21 -07:00
BUILD update bazel BUILD files 2019-10-06 15:29:23 -04:00
well_known_annotations_windows.go fix golint failures of pkg/kubelet/apis 2019-04-24 12:56:28 +08:00
well_known_annotations.go fix golint failures of pkg/kubelet/apis 2019-04-24 12:56:28 +08:00
well_known_labels.go fix golint failures of pkg/kubelet/apis 2019-04-24 12:56:28 +08:00