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

Topology support #141

Merged
merged 6 commits into from
Sep 25, 2018
Merged

Topology support #141

merged 6 commits into from
Sep 25, 2018

Conversation

verult
Copy link
Contributor

@verult verult commented Sep 19, 2018

Creating a PR for early review.

I have a local working prototype. The hope is each of these PRs introduce a feature whose implementation is as close to the final form as possible.

@jsafrane @msau42 @saad-ali @ddebroy

Features (some of these need more refinement but core logic is there):

  • Generating PV Node Affinity
  • Generating CSI requisite topology: Parsing AllowedTopologies
  • Generating CSI requisite topology: Topology aggregation across the cluster, when AllowedTopologies is missing
  • Generating CSI preferred topology
  • Evenly spreading topology preference for PVs in StatefulSets.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 19, 2018
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 19, 2018
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 19, 2018
return rsp.GetCapabilities(), nil
}

func supportsPluginControllerService(capabilities []*csi.PluginCapability) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have one helper method that searches capabilities for the passed in service

if err != nil {
glog.Errorf("failed to get support info :%v", err)
return "", err
glog.Errorf("failed to get plugin capabilities: %v", err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled as a separate pr, but I want to get rid of this style of logging errors that we're also returning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll address it in this PR. Improving the code base one line at a time :)

@@ -90,6 +90,11 @@ type csiProvisioner struct {
config *rest.Config
}

type driverState struct {
driverName string
accessibilityConstraintCapability bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a more clear name could be "supportsAccessiblity"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or you could potentially make this generic and have an enum of all the different capabilities

@verult verult force-pushed the final-top branch 9 times, most recently from 87991fd to 8a083d0 Compare September 24, 2018 21:59
@verult
Copy link
Contributor Author

verult commented Sep 24, 2018

All the core functionality and the vast majority of core testing is complete. Reviewers PTAL.

I'll add StatefulSet spreading in a separate PR post k8s 1.12 release since it's an optimization.

Working on the TODOs left in the PR but I'll hold off on pushing mode code for now until we get a critical mass of reviews

@verult verult changed the title [WIP] Topology support Topology support Sep 24, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2018
Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too large to review. Skimmed it. Largely LGTM.

@saad-ali
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saad-ali, verult

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 25, 2018
@k8s-ci-robot k8s-ci-robot merged commit 5c04206 into kubernetes-csi:master Sep 25, 2018
kbsonlong pushed a commit to kbsonlong/external-provisioner that referenced this pull request Dec 29, 2023
Added backoff parameters to external attacher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants