Skip to content
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

Cannot find AddOrUpdateTaint function anymore after migrating from v3 to v4 #290

Closed
timoreimann opened this issue Sep 7, 2017 · 7 comments

Comments

@timoreimann
Copy link
Contributor

timoreimann commented Sep 7, 2017

We recently upgraded a project from client-go v3.0.0 to v4.0.0. Previously, we used the AddOrUpdateTaint function to apply taints to nodes conveniently. Unfortunately, I wasn't able to find the function anymore after the upgrade to the newer client-go version.

Between v3 and v4, this commit was pushed to refactor the function-hosting helpers.go function into multiple files and move them into a new sub-package. AddOrUpdateTaint was removed there but apparently not re-added again. Interestingly, the originating main repository commit still included the function, though not in a sub-directory of staging (where the whole helpers sub-package seems to be missing).

Is AddOrUpdateTaint gone for good? If so, what's its designated replacement? Or is it still around and I just happen to miss it?

Thanks.

@ericchiang
Copy link
Contributor

This was moved out of api/v1/helpers in kubernetes/kubernetes#46514

It's a nice convenience but not particularly complicated to implement yourself. Is there some action you'd like to take to fix this or were you just wondering why it was moved?

@caesarxuchao
Copy link
Member

@timoreimann we unified the API types used by client-go with those used by the main Kubernetes in last release, so that they can share the same utility functions, but we are short-handed at the moment to finish the moving.

@timoreimann
Copy link
Contributor Author

@ericchiang @caesarxuchao as we continue to need the function, we vendored the copy from v3. That's okay for us, though I think it'd be nicer to reference something hosted by client-go. I could imagine upstream changing the implementation in the future which would then happen detached from our copy.

If you think that bringing back AddOrUpdateTaint into client-go is a worthwhile endeavor, I'd be happy to help (though I probably won't have bandwidth available immediately). Just let me know.

@caesarxuchao
Copy link
Member

We want to move all k8s-specific utility functions to k8s.io/pkg. @mengqiy do you know if we have a proposal for that?

@mengqiy
Copy link
Member

mengqiy commented Sep 7, 2017

We want to move all k8s-specific utility functions to k8s.io/pkg

I believe it will be more likely to be called k8s.io/common.
Proposal: kubernetes/kubernetes#50475
I think that repo will be ready at the very beginning of Q4.

@timoreimann
Copy link
Contributor Author

That looks like a bigger restructuring than what I expected -- still happy to help, though it might be easier to let you (upstream) finish the migration planning first.

Shall we keep this issue open to make sure we won't forget about AddOrUpdateTaint? Or will that happen automatically once k8s.io/common shapes itself up?

@caesarxuchao
Copy link
Member

I expect all the helper functions that were in pkg/api/v1/helpers.go to be move to the new repos, so it will happen "automatically". Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants