Always set codec in setExperimentalDefaults

Without this, the Jobs client used by
kubectl had codec type v1.  You would not notice this
on, say, a GET.  But when you tried to do an
Update, which did client-side conversion, then
you would get an error.
This commit is contained in:
Eric Tune
2015-09-28 14:36:54 -07:00
parent bf3f5af118
commit 293055b38e

View File

@@ -143,9 +143,7 @@ func setExperimentalDefaults(config *Config) error {
return fmt.Errorf("Experimental API version '%s' is not recognized (valid values: %s)",
config.Version, strings.Join(latest.GroupOrDie("experimental").Versions, ", "))
}
if config.Codec == nil {
config.Codec = versionInterfaces.Codec
}
config.Codec = versionInterfaces.Codec
if config.QPS == 0 {
config.QPS = 5
}