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

Use rollout informer instead of API list #17

Closed
jessesuen opened this issue Feb 6, 2019 · 2 comments
Closed

Use rollout informer instead of API list #17

jessesuen opened this issue Feb 6, 2019 · 2 comments
Milestone

Comments

@jessesuen
Copy link
Member

In service.go:

func (c *Controller) getRolloutsForService(service *corev1.Service) ([]*v1alpha1.Rollout, error) {
	allROs, err := c.rolloutsclientset.ArgoprojV1alpha1().Rollouts(service.Namespace).List(metav1.ListOptions{})
	if err != nil {
		return nil, err
	}

We should use the informer instead of list API

@dthomson25 dthomson25 added this to the v0.3.0 milestone Feb 15, 2019
@dthomson25
Copy link
Member

With this issue, we should investigate the code base and find other places that we can switch to informers in addition to the above example

@dthomson25
Copy link
Member

dthomson25 commented Mar 25, 2019

After investigating the code, the only place we use the API instead of the rollout informer is at https://github.com/argoproj/argo-rollouts/blob/master/controller/replicaset.go#L35. In this case, we are required to use the API to get up to date information.

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

2 participants