-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/util/annotation
and pkg/util/finalizers
should use metav1.Object
instead of pkgruntime.Object
for more ergonomic annotation handling
#99
Comments
@gary-lgy Hi, I want to try this, can you assign this to me? |
pkg/controllers/util/annotation/annotation.go
should use metav1.Object
instead of pkgruntime.Object
for more ergonomic annotation handlingpkg/util/annotation
and pkg/util/finalizers
should use metav1.Object
instead of pkgruntime.Object
for more ergonomic annotation handling
@kevin1689-cloud Hi! The major refactor has been completed a while ago. Would you like to continue working on refactoring the annotation util functions as discussed in #144 ? |
Hi, thanks for the remind. I have been so busy with my work recently that I'm afraid I have no extra time to do the contribute, you can assign it to other people. By the way, wish kubeadmiral will be better and better! |
@kevin1689-cloud no worries. @z1cheng Thank you for your work on |
@gary-lgy Sure, will finish it this week :) |
k8s.io/apimachinery/pkg/runtime.Object
does not haveGetAnnotations
andSetAnnotations
methods. As a result the annotation util functions inpkg/controllers/util/annotation/annotation.go
resort to callingmeta.Accessor(obj)
to convert the object. Butmeta.Accessor(obj)
returns an error that must be propagated upwards.In fact, all current usages of the annotation util functions pass in objects that implement
metav1.Object
interface, which allows callingSetAnnotations
andGetAnnotations
without returning errors.The text was updated successfully, but these errors were encountered: