community icon indicating copy to clipboard operation
community copied to clipboard

Use one kind of k8s `api-server` clients in service controllers runtime

Open a-hilaly opened this issue 4 years ago • 2 comments

Follow-up conversation to #255

Currently the AWS Service controllers uses two kind of k8s api-server clients:

Both clients are create inside the same method ReconcilerBindControllerManager.

We should figure out a better way to do this, ideally by using the same client type for every component that needs a k8s client. The best scenario would be to have something similar to:

func (r *reconciler) BindControllerManager(mgr ctrlrt.Manager) error {
	// ...
	client := mgr.GetClient()
        r.kc = client
	r.cache = ackrtcache.New(client r.log)
	//...
}

Currently i'm not aware of any function capable of transforming a kubernetes.Interface to client.Client or/and vice versa.

/need-investigation /priority important-long-term

a-hilaly avatar Sep 21 '20 15:09 a-hilaly

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. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot avatar Aug 27 '21 11:08 ack-bot

/lifecycle frozen

a-hilaly avatar Aug 30 '21 15:08 a-hilaly