Skip to content

Releases: kubernetes-sigs/controller-runtime

v0.16.0

22 Aug 14:52
c20ea14
Compare
Choose a tag to compare

Highlights

  • Granular cache configuration (#2421)
  • New cache option to fail on missing informer on cache reads (#2406)
  • Secure metrics serving (#2407)
  • Upgrade to Kubernetes 1.28 libraries (#2393, #2405, #2449)

Changes since v0.15

⚠️ Breaking Changes

  • Bump k8s.io/* dependencies to v1.28.0 by @sbueringer (#2393, #2405, #2449)
  • Allow configuring more granular cache filtering by @alvaroaleman (#2421)
  • Introduce Metrics Options & secure metrics serving by @sbueringer (#2407)
  • Return an error if the continue list option is set for the cache reader by @shuheiktgw (#2439)
  • Remove deprecated manager, webhook and cluster options by @sbueringer (#2422)
  • Remove deprecated MultiNamespacedCacheBuilder, NewFakeClientWithScheme, controllerutil.Object, envtest.Environment.KubeAPIServerFlags & zap.Options.DestWritter by @sbueringer (#2423)
  • controller builder: return error when multiple reconcilers are set by @sbueringer (#2415)
  • fake client: use correct RBAC apiGroup name when deciding if to allow unconditional updates by @jaideepr97 (#2412)
  • Minor improvements to godoc & code style in cache pkg by @sbueringer (#2416)

✨ New Features

🐛 Bug Fixes

🌱 Others

  • Use NewRateLimitingQueueWithConfig instead of deprecated NewNamedRateLimitingQueue by @sbueringer (#2411)
  • Add a prefix to the stack trace printed after SetLogger timeout by @vincepri (#2357)
  • Minor improvements to godoc, code style in builder pkg by @sbueringer (#2414)
  • Add integration test to avoid manager.Start deadlocks by @sbueringer (#2418)
  • Automatically regenerate scratch env go mod file by @sbueringer (#2413)
  • Introduce a new runnable group for basic servers of the manager by @zqzten (#2337)
  • Add logs around Reconcile call, change webhook logs to log level 5 by @sbueringer (#2419)
  • Add action to update modules on dependabot PRs by @sbueringer (#2447, #2448)
  • Optimize Add/RemoveFinalizer by @0xff-dev (#2348)
  • Log warning if error and non-zero Result are returned by @sbueringer (#2451)

📖 Documentation and proposals

📈 Dependencies

Thanks to all our contributors! 😊

Full Changelog: v0.15.0...v0.16.0

v0.15.2

23 Aug 10:56
36bb899
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.15.1...v0.15.2

v0.15.1

04 Aug 17:52
40203bf
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.15.0...v0.15.1

v0.15.0

23 May 13:35
116a1b8
Compare
Choose a tag to compare

Controller Runtime v0.15

A 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.

Changes since v0.14.5

⚠️ Breaking Changes

  • Make *http.Client configurable and use/share the same client by default (#2122)
    • When using the default Manager configuration, no immediate changes are needed.
    • 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.
  • Deprecate Component Configuration config/v1alpha1 types (#2149, #2200)
    • The Component Configuration package has been unmaintained for over a year and is no longer actively developed. There are (currently) no plans to revive the package, or provide an alternative.
    • Users should migrate to a custom implementation that sets Manager.Options directly.
    • 👉 Feedback requested: removal of the deprecated types and code is tracked in #895.
  • Remove dependency injection functions (#2134, #2120)
    • The package pkg/inject has been removed, this package contained long deprecated injection functions (like InjectScheme, InjectLogger, InjectConfig, InjectClient, InjectCache, etc.).
    • The runtime injection functionality has been deprecated since Controller Runtime 0.10; all of the above fields can be passed from the Manager to structs or interfaces that need them.
  • Improve 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.
      • For source.Source, use WatchesRawSource.
    • builder.Builder.WatchesMetadata has been added to simplify watching PartialObjectMetadata objects.
  • Refactor cache.Options, deprecate MultiNamespacedCacheBuilder (#2157, #2166)
    • 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.
    • The following [..]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.
  • Add context to EventHandler(s) (#2139)
    • 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.
  • Add client.{GroupVersionKindFor, IsObjectNamespaced} (#2136)
    • The 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.
  • Remove DelegatedClient, move all related options in client.New (#2150)
    • client.NewDelegatingClient constructor and client.NewDelegatingClientInput struct have been removed.
      • The DelegatingClient created a Client backed by a cache, use 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.
  • Expose Manager.Cache/Client options, deprecate older options (#2199, #2177)
    • manager.Options.Cache is now the preferred way to customize the cache options for the manager.
      • Users can also keep using 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.
      • Users can also keep using 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.
    • The following webhook server options have been deprecated, use manager.WebhookServer instead.
      • manager.Options.Port
      • manager.Options.Host
      • manager.Options.CertDir
      • manager.Options.TLSOpts
  • Remove cache.BuilderWithOptions (#2300)
  • Add constructors for webhook/conversion, remove webhook/admission.GetDecoder() (#2144)
    • There are two set of changes related to the webhooks and how they're exposed. For users using the Manager, there should be minimal to no required changes.
    • 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:
    • Use Result.Message instead of Result.Reason (#1539)
    • Validator and CustomValidator interfaces have been modified to allow returning warnings (#2014)
  • Testing: Fake client status handling (#2259)
    • Added a new WithStatusSubresource option and pre-populating it with
      all in-tree resources that have a status subresource
    • Update and Patch methods now don't change the status for any such
      resource anymore
    • The status clients Update and Patch methods now only change the status
      for any such resource
  • Remove high cardinality metrics (#2217, #2298)
    • rest_client_request_latency_seconds
    • rest_client_request_duration_seconds
    • rest_client_request_size_bytes
    • rest_client_response_size_bytes
  • Allow passing a custom webhook server (#2293, #2329)
    • The webhook.Server struct is now an interface
    • webhook.NewServer can be used to pass in and customize the default server
  • Flatten fields in controller.Options (#2307)
  • Update fake client deletionTimestamp behavior (#2316)
    • The fake client will panic if initialized with an object that has a DeletionTimestamp and no finalizer
    • The fake client will silently ignore a DeletionTimestamp on an object in a Create request, matching the behavior of the kube-apiserver
  • Unexport delegating logger, remove async init (#2317)
    • log.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.
    • Previously, when the 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.
  • Change webhook request received / response written logs to log level 4 (#2334)
  • Use and offer a single dynamic lazy RESTMapper (#2116, #2296)
    • The following options have been removed: WithCustomMapper, WithExperimentalLazyMapper, WithLazyDiscovery, WithLimiter.
    • The DynamicRESTMapperOption type has been removed.

✨ New Features

  • Add cross-version compatibility with client-go 1.27 (#2223)
  • Introduce pprof server to manager (#1943)
    • To enable, use Manager.Options.PprofBindAddress.
  • Added interceptor client to intercept calls to a client (#2248 #2306)
  • Add reconcile.TerminalError(...) (#2325)
    • By wrapping an error with the above package-level function, the controller won't retry the request again in an exponential backoff loop.
    • The error is logged, and the controller_runtime_terminal_reconcile_errors_total metric is incremented.

🐛 Bug Fixes

  • Use correct context to cancel "list and watch" & wait for all informers to complete (#2121)
  • Client: use passed in Cache.DisableFor option (#2303)
  • Fix race condition in channel source (#2286)
  • ForceOwnership should work with subresourc...
Read more

v0.14.6

28 Mar 14:25
cd65cb2
Compare
Choose a tag to compare

What's Changed

  • 🐛 Preserve unstructured object GVKs when using *ByObject cache options by @joelanford in #2249

Full Changelog: v0.14.5...v0.14.6

v0.14.5

01 Mar 21:10
ffb74e5
Compare
Choose a tag to compare

What's Changed

  • 🐛 Allow to set GracefulShutdownTimeout to -1, disabling timeouts in #2198
  • 🌱 GVKForObject should handle multiple GVKs in Scheme gracefully in #2202
  • ✨ Add rest client request duration and size metrics in #2218
  • 🐛 Allow lazy restmapper to work with CRDs created at runtime in #2219

Full Changelog: v0.14.4...v0.14.5

v0.14.4

06 Feb 01:45
b9940ed
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.3...v0.14.4

v0.14.3

04 Feb 21:18
5055a52
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.2...v0.14.3

v0.14.2

27 Jan 19:15
7a4c6ec
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.1...v0.14.2

v0.14.1

19 Dec 23:13
84c5c9f
Compare
Choose a tag to compare

Changes since v0.14.0

🐛 Bug Fixes

Full Changelog: v0.14.0...v0.14.1