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

Plan for Injector interface deprecation #1433

Open
DirectXMan12 opened this issue Mar 16, 2021 · 5 comments
Open

Plan for Injector interface deprecation #1433

DirectXMan12 opened this issue Mar 16, 2021 · 5 comments
Assignees
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone

Comments

@DirectXMan12
Copy link
Contributor

So, we filed the injector interface deprecation notice on pkg/inject (#1322). What's the actual rest of the plan for this? We should track this & provide a loose plan for what we're gonna do and what people should expect.

cc @varshaprasad96

@DirectXMan12 DirectXMan12 modified the milestones: v0.10.0, v0.10.x Mar 16, 2021
@varshaprasad96
Copy link
Member

varshaprasad96 commented Mar 17, 2021

@vincepri @alvaroaleman @estroz
inject functionality was to be deprecated since it would eventually get hard to maintain the codebase wherein we define interfaces/functions for each of the types which are to be propagated to other components registered with manager. Though we have mentioned that manager.Options can be used instead of this in manager, we are still using injectors in the following places:

  1. handler (to inject fields into mapper)
  2. controller (while setting up watch: to inject cache)
  3. manager (this could be replaced by using manager.Options)
  4. pkg/source (to inject stopchannel which is needed to start source.Channel)
  5. pkg/webhook/server.go (to inject field setter in webhook server)
  6. Injecting dependencies in cluster config

Pinging here to start a discussion on suggestions for next steps to remove the functionality internally from the above implementations, so that we can deprecate and remove it later.

@parmus
Copy link

parmus commented Apr 6, 2021

@varshaprasad96 Would it be possible that we could get an example of how we are meant to use manager.Options in the future. E.g. it is currently unclear to me how a reconcile function controller added with Manager.Add() is suppose to get a hold of a client. So far the documentation just says "Use manager.Options fields directly. This package will be removed in v0.10." It would be really nice with an example of how to migrate.

@alvaroaleman
Copy link
Member

Sorry, I missed the notifications here. So yeah, the next steps would be to get rid of all of it internally, which might also entail some breaking changes. There are also examples where its just about removing dead code, source.Channel is one of them.

Generally speaking I would assume that we will deprecate the injection on the release after which we removed it internally and then give at least two releases time for ppl to update their code.

@parmus at this point you are not expected to do anything. You can get a client from the Manager by calling its GetClient method (this doesn't have anything to do with the managers Options). As soon as there is something consumers need to do, it will be in the release notes.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2021
@vincepri
Copy link
Member

vincepri commented Jul 6, 2021

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

7 participants