Changes since v0.14.5 โ ๏ธ Breaking ChangesA note from the maintainers
The following release is probably the largest in the history of the project. Controller Runtime is a foundational piece for almost all controllers and operators and we're aware that breaking changes are never an ask for our users, especially while running production services.
We take breaking changes very seriously and carefully reviewed each one of these changes to improve the codebase, user experience, and future maintainability of the project.
The v0.15 release is a stepping stone towards maturity.
As always, please reach out in Slack in #controller-runtime.
*http.Client
configurable and use/share the same client by default (#2122)
client/apiutil.NewDynamicRESTMapper
signature has changed and now requires an *http.Client
as parameter.cluster.Cluster
interface requires GetHTTPClient()
method which must return an already configured, non-nil, *http.Client
for the Cluster. When using cluster.New
to create Clusters, the client is created internally if not specified as an Options
field.cluster.Options.MapperProvider
field now requires a *rest.Config
and *http.Client
.config/v1alpha1
types (#2149, #2200)
Manager.Options
directly.pkg/inject
has been removed, this package contained long deprecated injection functions (like InjectScheme
, InjectLogger
, InjectConfig
, InjectClient
, InjectCache
, etc.).Manager
to structs or interfaces that need them.builder
package capabilities and general UX (#2135)
builder.Builder.Watches
signature has changed, it now takes a client.Object
instead of a source.Source
as first argument.
source.Source
, use WatchesRawSource
.builder.Builder.WatchesMetadata
has been added to simplify watching PartialObjectMetadata
objects.cache.Options.Namespace
has been removed in favor of cache.Options.Namespaces
, a slice.cache.Options.Resync
has been renamed to SyncPeriod
.cache.Options.DefaultSelector
has been removed and split in two fields:
cache.Options.DefaultLabelSelector
cache.Options.DefaultFieldSelector
cache.Options.DefaultTransform
was added to provide a global transform function.cache.Options.UnsafeDisableDeepCopy
was added to provide a global toggle to disable DeepCopy of the objects from the cache before returning them to clients.[..]ByObject
field have been refactored:
cache.Options.SelectorsByObject
has been removed, use cache.Options.ByObject[Object].Field
and cache.Options.ByObject[Object].Label
cache.Options.UnsafeDisableDeepCopyByObject
has been removed, use cache.Options.ByObject[Object].UnsafeDisableDeepCopy
.cache.Options.TransformByObject
has been removed, use cache.Options.ByObject[Object].Transform
.cache.ObjectAll
has been removed. This type was previously used to set selectors or transformation functions for every object, use the newly introduced default global options instead.handler.EventHandler
and handler.Funcs
interfaces require context.Context
as the first parameter for every method.handler.MapFunc
signature has changed and now requires a context.Context
.client.Client
interface now requires and exposes these helper functions:
GroupVersionKindFor(Object)
which returns the schema.GroupVersionKind
for the object.IsObjectNamespaced(Object)
which returns true
if the object's GroupVersionKind is namespaced, or false
for global ones.client.New
(#2150)
client.NewDelegatingClient
constructor and client.NewDelegatingClientInput
struct have been removed.
client.New
and set client.Options.Cache
to customize the client's caching behavior.cluster.NewClientFunc
has been moved to client.NewClientFunc
.cluster.ClientOptions
has been removed.cluster.DefaultNewClient
has been removed.cluster.ClientBuilderWithOptions
has been removed.manager.Options.Cache
is now the preferred way to customize the cache options for the manager.
manager.Options.NewCache
, which has now been marked as a low level primitive.manager.Options.Client
is now the preferred way to customize the client options for the manager.
manager.Options.NewClient
, which has now been marked as a low level primitive.manager.Options.SyncPeriod
has been deprecated in favor of manager.Options.Cache.SyncPeriod
.manager.Options.Namespace
has been deprecated in favor of manager.Options.Cache.Namespaces
.manager.Options.DryRunClient
has been deprecated in favor of manager.Options.Client.DryRun
.manager.Options.ClientDisableCacheFor
has been deprecated in favor of manager.Options.Client.Cache.DisableCacheFor
.manager.WebhookServer
instead.
manager.Options.Port
manager.Options.Host
manager.Options.CertDir
manager.Options.TLSOpts
cache.BuilderWithOptions
(#2300)webhook/conversion
, remove webhook/admission.GetDecoder()
(#2144)
webhook/admission/Webhook.GetDecoder()
method has been removed, it was unused before and relied on runtime dependency injection.webhook/conversion.Webhook
struct has been un-exported. Users should use webhook/conversion.NewWebhookHandler
instead.pkg/webhook/admission
:
WithStatusSubresource
option and pre-populating it withUpdate
and Patch
methods now don't change the status for any suchUpdate
and Patch
methods now only change the statusrest_client_request_latency_seconds
rest_client_request_duration_seconds
rest_client_request_size_bytes
rest_client_response_size_bytes
webhook.Server
struct is now an interfacewebhook.NewServer
can be used to pass in and customize the default serverlog.DelegatingLogSink
has been unexported, this logger should never be used on its own, and it's only meant to be used within controller-runtime initialization process.pkg/log
package was imported, there was an init
function that spawned a goroutine, which set a null logger after 30 seconds. Now this logic has been removed, and instead incorporated into the delegating logger private implementation.WithCustomMapper
, WithExperimentalLazyMapper
, WithLazyDiscovery
, WithLimiter
.DynamicRESTMapperOption
type has been removed.Manager.Options.PprofBindAddress
.reconcile.TerminalError(...)
(#2325)
controller_runtime_terminal_reconcile_errors_total
metric is incremented.NewDynamicRESTMapper
(#2178)๐ Additionally, there have been 4 contributions to our documentation and book. (#2203, #2201, #2162, #2170)
Thanks to all our contributors! ๐
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4