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

Reduce CentralCapacityController workque depth by filtering allowed topologies in storage class #1162

Open
yuxiang-he opened this issue Feb 22, 2024 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@yuxiang-he
Copy link

yuxiang-he commented Feb 22, 2024

Is your feature request related to a problem?/Why is this needed

See onSCAddOrUpdate implementation in https://github.com/kubernetes-csi/external-provisioner/blob/v4.0.0/pkg/capacity/capacity.go#L378-L384

	segments := c.topologyInformer.List()

	c.capacitiesLock.Lock()
	defer c.capacitiesLock.Unlock()
	for _, segment := range segments {
		c.addWorkItem(segment, sc)
	}

Currently the capacity controller creates a workqueue item for every segment x storageClass combination, some of which are impossible.

Describe the solution you'd like in detail

Storage classes can specify allowed topologies https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies so not all combinations of segment x storageClass are valid here. An example would be certain types of storage (and hence storage class) are only available in selected topology segments.

We can reduce potential workqueue cardinality by filtering out impossible segment x storageClass combinations. This allows quicker CSIStorageCapacity object updates.

Describe alternatives you've considered

Additional context

@yuxiang-he
Copy link
Author

This is another issue discovered while investigating #1161

@pohly
Copy link
Contributor

pohly commented Feb 22, 2024

This makes sense to me.

/triage accepted
/help

@k8s-ci-robot
Copy link
Contributor

@pohly:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

This makes sense to me.

/triage accepted
/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants