In kube-apiserver, when we get or list a resource, in resthandler.go it will set the 'SelfLink', it will result in little performance loss. I wonder what's the meaning of it, ObjectMeta.SelfLink has already been set in etcd, why reset it? Thanks.
You're right, its redundant and unnecessary. It shouldn't be set especially when we persisting items to disk (etcd). SelfLink is only useful for kube clients and not for the apiserver.
Indeed, this is an issue being tracked in the kubernetes repo here: https://github.com/kubernetes/kubernetes/issues/2797