Skip to content

Upgrading sigs.k8s.io/controller-runtime 0.11 to 0.12

Breakingv0.11.2 → v0.12.3Breaking3Security1New6Changed4Fixed14Other2

BreakingUpgrade verdict

3 breaking changes and a security fix.

  • Deleting objects through the fake test client now respects dry run, so nothing is actually removed when dry run is set.
  • Leader election now defaults to using Lease objects instead of the previous lock type.
  • Log output now follows Kubernetes structured logging conventions and includes a reconcile ID, which changes log format.
  • A denial-of-service vulnerability in the Prometheus client library is fixed by upgrading it.
4 items need code or config changes
Breaking3
Makes fake client delete operations honor the dry run option.
Uses 'leases' as the default resource lock object for leader election.
leases
Aligns logging to Kubernetes structured logging and adds reconcileID.
reconcileID
Security1
Updates prometheus/client_golang from 0.11.0 to 0.11.1 to fix a DoS.
prometheus/client_golang

Generated by DepDelta from published Go source. Not mixed with prose notes.

  • removed: method Builder.WithLogger(logr.Logger) *Builder
  • added: method Builder.WithLogConstructor(func(*reconcile.Request) logr.Logger) *Builder
  • added: field Options.DefaultTransform: toolscache.TransformFunc
  • added: field Options.TransformByObject: TransformByObject
  • added: type TransformByObject: map[client.Object]toolscache.TransformFunc
  • added: var ReadCertificateErrors
  • added: var ReadCertificateTotal
  • added: method ClientBuilder.WithObjectTracker(testing.ObjectTracker) *ClientBuilder
  • removed: field Options.Log: logr.Logger
  • added: field Options.LogConstructor: func(request *reconcile.Request) logr.Logger
  • added: method FakeInformer.SetTransform(cache.TransformFunc) error
  • changed: func AddFinalizer(client.Object, string) → func AddFinalizer(client.Object, string) (bool)
  • changed: func RemoveFinalizer(client.Object, string) → func RemoveFinalizer(client.Object, string) (bool)
  • added: func Get(client.Object) func() error
  • added: func List(client.ObjectList, ...client.ListOption) func() error
  • added: func New(client.Client) Komega
  • added: func Object(client.Object) func() (client.Object, error)
  • added: func ObjectList(client.ObjectList, ...client.ListOption) func() (client.ObjectList, error)
  • added: func SetClient(client.Client)
  • added: func SetContext(context.Context)
  • added: func Update(client.Object, func(), ...client.UpdateOption) func() error
  • added: func UpdateStatus(client.Object, func(), ...client.UpdateOption) func() error
  • added: method Komega.Get(client.Object) func() error
  • added: method Komega.List(client.ObjectList, ...client.ListOption) func() error
  • added: method Komega.Object(client.Object) func() (client.Object, error)
  • added: method Komega.ObjectList(client.ObjectList, ...client.ListOption) func() (client.ObjectList, error)
  • added: method Komega.Update(client.Object, func(), ...client.UpdateOption) func() error
  • added: method Komega.UpdateStatus(client.Object, func(), ...client.UpdateOption) func() error
  • added: method Komega.WithContext(context.Context) Komega
  • added: type Komega: interface
  • added: field Options.BaseContext: BaseContextFunc
  • added: type BaseContextFunc: func() context.Context
  • added: field Server.TLSOpts: []func(*tls.Config)
  • added: func NewContextWithRequest(context.Context, Request) context.Context
  • added: func RequestFromContext(context.Context) (Request, error)