Commit Graph

39 Commits (11b058cc7dea3b0777ac822b32f56baef9e07231)

Author SHA1 Message Date
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman 12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Wojciech Tyczynski 7f919a44c2 Generate conversions for v1beta3 package. 2015-04-24 09:18:12 +02:00
Wojciech Tyczynski ea314d55f7 Create benchmarks for conversions. 2015-04-22 16:27:23 +02:00
Clayton Coleman 545a5a865f List output with differing types should be more resilient
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.

Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Prashanth Balasubramanian a7864aa230 Scheduler uses TTLStore for assumed pods 2015-04-08 15:01:04 -07:00
Clayton Coleman 1618c39a46 Convert List query parameters via object conversion
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00
Clayton Coleman ea32b89e5e Allow map[string][]string to be converted to an object
Will allow query parameters to be converted to versioned objects.
2015-03-24 17:25:45 -04:00
nikhiljindal 790a8bbd23 Adding conversion functions for event field selectors 2015-03-12 14:10:51 -07:00
Daniel Smith 1fdf749211 fix e2e failure 2015-03-02 15:03:56 -08:00
Daniel Smith c4822dc060 Revert "Revert "Adding converter functions to convert field label selectors to internal version before matching""
This reverts commit 5f35a67002.
2015-03-02 15:00:09 -08:00
Zach Loafman 5f35a67002 Revert "Adding converter functions to convert field label selectors to internal version before matching" 2015-02-28 11:42:49 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Tim Hockin 1ddb68d8d7 Sketch: a third take on defaulting values 2015-02-02 22:35:58 -08:00
deads2k fe398938e8 handle omitted rawExtension 2015-02-02 14:53:22 -05:00
Clayton Coleman 5f6caaba2e Add TypeAccessor to api/meta for objects without Object/ListMeta
Adding objects that have TypeMeta (use runtime.Scheme) but do not
expose ObjectMeta/ListMeta (because they are not Kube API objects)
and wanted to get the simpler access path for in memory objects.
2015-01-20 17:37:24 -05:00
Clayton Coleman 8a833ca701 Add a List type that can contain arbitrary objects
Supports objects that the core schema may not recognize and
preserves them unmodified as runtime.Unknown
2014-12-09 10:31:17 -05:00
Clayton Coleman db2c59ff61 Allow conversion between []runtime.Object and []runtime.RawExtension
This allows generic lists with unrecognized objects to be roundtripped
between internal and external objects.
2014-12-09 10:31:17 -05:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Daniel Smith 8d762c996a Remove boilerplate coversion functions 2014-11-24 12:57:34 -08:00
Clayton Coleman 39882a3555 Allow Create/Update/Delete kubectl commands to handle arbitrary objects
* Ensure kubectl uses abstractions from other parts of Kube
* Begin adding abstractions that allow arbitrary objects
* Refactor "update" to more closely match allowed behavior
2014-11-04 10:44:56 -05:00
Clayton Coleman 778a50d00b Introduce ObjectConvertor for conversion to known API versions
Will allow clients to transform internal objects to a version
suitable for external output.
2014-11-04 10:34:15 -05:00
Clayton Coleman 58715527aa Make DataVersionAndKind public on runtime.Scheme
Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
2014-10-29 12:10:55 -04:00
Clayton Coleman 73dba3a613 Move FindTypeMeta into the proper file 2014-10-13 23:29:40 -04:00
Clayton Coleman 485106e270 Remove unused code 2014-10-13 23:29:39 -04:00
Clayton Coleman 13992837ea Use one copy of EnforcePtr 2014-10-13 23:29:39 -04:00
Clayton Coleman d488e238dd Genericize MetaInsertionFactory into a simpler interface
The common path code for MIF goes through a conversion cycle - it
can also be done through reflection. This simplifies the Create/Update
methods into Interpret (return version) and Update (through reflection).

In addition it uses only one MetaFactory implementation across all of
our packages which reduces a bit of duplication.
2014-10-13 23:29:39 -04:00
Clayton Coleman 5382627e6a Move Codec functions to their own file 2014-10-09 17:25:23 -04:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
Daniel Smith ee107d3fad fix extra un-cosmetic extraneous code. 2014-10-07 14:08:18 -07:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Clayton Coleman 305db35422 Add a Log method on Scheme for better debugging 2014-10-05 17:17:25 -04:00
Daniel Smith 6ac7578699 Add GetReference() 2014-09-26 17:40:07 -07:00
Daniel Smith 957b16053a restore test that somehow vanished + add SetList 2014-09-25 12:07:07 -07:00
Clayton Coleman fece926e2b Remove unnecessary EmbeddedObjects
Clarify the tests in embedded_test.go to indicate that unmarshalling
of an internal object (runtime.EmbeddedObject) will not work.  Instead,
consumers should decode raw external objects.
2014-09-22 16:03:07 -04:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Daniel Smith 44f340f127 Remove custom scheme stuff
As separate commit to make it easy to get back-- I'm not completely
convince we won't want this in the future.
2014-09-15 13:15:46 -07:00
Daniel Smith b8c955ea17 Fixes:
* Fix kubecfg test, which was writing an internal object straight to yaml
* Address review comments
2014-09-15 13:15:46 -07:00
Daniel Smith 52d2c221b8 pkg/runtime now has a well defined api pluggability model. 2014-09-15 13:15:46 -07:00