flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.81k stars 661 forks source link

[Housekeeping] Use domain-qualified finalizers #6019

Open trutx opened 2 weeks ago

trutx commented 2 weeks ago

Describe the issue

After upgrading our cluster to Kubernetes 1.29 we started seeing warnings like the following in Flyte admin logs:

W1115 11:54:31.278411      14 warnings.go:70] metadata.finalizers: "flyte-finalizer": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers

The change was introduced in https://github.com/kubernetes/kubernetes/pull/119508 so it's an external change we should adapt to. The current finalizer is not domain-qualified and besides all the finalizer-managing logic in that file has become obsolete.

Given this, we should change the finalizer to a proper one and also take the opportunity to get rid of that code and leverage the finalizer logic in https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/controller/controllerutil/controllerutil.go, which we would have maintained and tested for free.

What if we do not do this?

Not using domain-qualified finalizers causes noisy warning messages in the logs for now but such finalizers might be required in future Kubernetes versions, which would mean all of Flyte finalizer logic would stop working.

Related component(s)

Flyteadmin, flytepropeller.

Are you sure this issue hasn't been raised already?

Have you read the Code of Conduct?