The LoadTLSFiles method is useful for configuration code that needs
to read the current client config and get values out for creating
other config files.
Add an AddIfNotPresent function to support single producer/consumer
retry scenarios. Provides the consumer with a means to prefer items
already enqueued by the producer at the point of retry.
Revise our code to only call Request.Namespace() if a namespace
*should* be present. For root scoped resources, namespace should
be ignored. For namespaced resources, it is an error to have
Namespace=="".
# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
# pkg/api/v1beta1/types.go
# pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
# COMMIT_BLOCKED_ON_DESCRIPTION
Form:
kube-controller-manager/v0.10.0 (linux/amd64) kubernetes/550b98e
<basename(os.Argv)>/<gitVersion> (<GOOS>/<GOARCH>) kubernetes/<shortGitCommit>
Can be set by other clients
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).
* This change is based on pull request 2587.
* Most defaulting has been migrated to defaults.go where the defaulting
functions are added.
* validation_test.go and converter_test.go have been adapted to not testing the
default values.
* Fixed all tests with that create invalid objects with the absence of
defaulting logic.
Without the ability to retrieve underlying items by key (instead of
the object passed to KeyFunc) it is impossible to build wrappers
around cache.Store that want to make decisions about keys, because
they would need to reconstruct the object passed to Get.
This allows retrieval by key, and makes sure Get(obj) uses it.
OpenShift currently uses '-n', so opening up the potential for downstream
to set a short namespace. However, this should only be used in general for
commands that want to work across namespaces frequently - such as admin
level operations on entire namespaces like quota or cleanup behavior where
you have permissions and need to rapidly switch.
client.Config describes how to make a client connection to a server
for HTTP traffic, but for connection upgrade scenarios cannot be
used because the underlying http.Transport object can't allow the
connection to be hijacked. Reorganize the TLS and connection wrapper
methods so that a sophisticated client can do:
cfg := &client.Config{...} // from somewhere
tlsConfig, _ := client.TLSConfigFor(cfg)
_ := conn.Dial(...)
rt := MyRoundTripper() // some func that implements grabbing requests
wrapper, _ := client.HTTPWrappersFor(cfg)
req := &http.Request{}
req.Header.Set("Connection-Upgrade", ...)
_, := wrapper.RoundTrip(req)
// rt has been invoked with a fully formed Req with auth
rt.Req.Write(conn)
// read response for upgrade
It would be good to have utility function that does more of this,
but mostly enabling the HTTP2/SPDY client exec function right now.
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.
Implementation of a fix for #2294.