Commit Graph

4 Commits

Author SHA1 Message Date
Clayton Coleman
6a05ad71cc Use CodecFactory.WithoutConversion() everywhere
Clarifies that requesting no conversion is part of the codec factory, and
future refactors will make the codec factory less opionated about conversion.

Kubernetes-commit: 7f9dfe58f4cbe1e1b9e80f52addff70bac87bed4
2019-04-03 13:24:37 -04:00
Ihar Hrachyshka
5a81ef4b43 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.

Kubernetes-commit: d68cd8a0c7e6137ca4219078a3d651ecff03c21f
2018-11-14 15:22:48 -08:00
Jordan Liggitt
d4529fcb10 Regenerate clients
Kubernetes-commit: 93be54b28801dbffbc48fcb6018f99beadae51da
2019-02-21 13:50:12 -05:00
Dr. Stefan Schimanski
574892d56c Update generated code
Kubernetes-commit: 714b28cf22133d39bd637f8b0e6d5774a4eff415
2019-02-15 13:35:58 +01:00