Skip to content

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

@a-hilaly

Description

@a-hilaly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeIssues or PRs as related to controller runtime, common reconciliation logic, etckind/enhancementCategorizes issue or PR as related to existing feature enhancements.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions