k3s/pkg/client
Ihar Hrachyshka d68cd8a0c7 Expose object tracker for fake clientsets
Not every object kind can be registered via tracker .Add() called as
part of SimpleClientset initialization. This is because .Add() relies
on UnsafeGuessKindToResource to convert object kinds into resource
type names, which is broken for some resources. An example of an
affected kind is NetworkAttachmentDefinitions CRD that uses
network-attachment-definitions as its resource type name. When
UnsafeGuessKindToResource is called for this kind, it returns
networkattachmentdefinitions (without dashes).

As per the comment inside .Add, kinds affected by
UnsafeGuessKindToResource deficiencies should instead register objects
using tracker .Create() method.  Problem is, current SimpleClientset
struct definition doesn't expose the object tracker in any way, which
makes it impossible to properly register these kinds at all.

To address the issue, this change modifies the definition of
SimpleClientset struct to expose the object tracker used via Tracker()
method.
2019-04-03 11:44:05 -07:00
..
clientset_generated Expose object tracker for fake clientsets 2019-04-03 11:44:05 -07:00
conditions Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
leaderelectionconfig autogenerated files 2019-01-06 15:48:53 +02:00
metrics convert latency in mertics name to duration 2019-02-22 21:40:13 +08:00
testdata Merge pull request #72525 from justinsb/owners_should_not_be_executable 2019-02-14 23:55:45 -08:00
tests Upgrade ListWatchUntil 2019-02-26 16:21:39 +01:00
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00