A NegotiatedSerializer is passed into the API installer (and
ParameterCodec, which abstracts conversion of query params) that can be
used to negotiate client/server request/response serialization. All
error paths are now negotiation aware, and are at least minimally
version aware.
Watch is specially coded to only allow application/json - a follow up
change will convert it to use negotiation.
Ensure the swagger scheme will include supported serializations - this
now includes application/yaml as a negotiated option.
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).
Did not change the metadata fields for now.
In order to allow certain programmer error / unexpected error states
to be captured, replace sections that log and eat errors with a method
that can be centrally replaced. This captures two common error sources,
replication errors, and apiserver code that returns invalid errors.
Currently HttpLog only expected status range - this logs errors
that come back from a REST storage object without being first
converted to something in pkg/api/errors. This usually indicates
unexpected error conditions that a programmer didn't explicitly
check for - the kinds of problems that may need debugging by
an operator later. Set to V(1) because they don't impair normal
operation.
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually. Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.