Skip to content

Commit

Permalink
WIP: avoid GET for selected node
Browse files Browse the repository at this point in the history
  • Loading branch information
pohly committed Dec 3, 2020
1 parent 14e474f commit 0538807
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 9 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ See the [storage capacity section](#capacity-support) below for details.

* `--node-deployment-max-delay`: Determines how long the external-provisioner sleeps at most before trying to own a PVC with immediate binding. Defaults to 60 seconds.

* `--local-topology`: Instead of watching Node and CSINode objects, use only the topology provided by the CSI driver. Only valid in combination with `--node-deployment`. Disabled by default, but recommended for drivers which have a single topology key with different values for each node (i.e. local volumes).

#### Other recognized arguments
* `--feature-gates <gates>`: A set of comma separated `<feature-name>=<true|false>` pairs that describe feature gates for alpha/experimental features. See [list of features](#feature-status) or `--help` output for list of recognized features. Example: `--feature-gates Topology=true` to enable Topology feature that's disabled by default.

Expand Down Expand Up @@ -262,6 +264,8 @@ each CSI driver on different nodes. The CSI driver deployment must:
to match the expected cluster size and desired response times
(only relevant when there are storage classes with immediate binding,
see below for details)
- use `--local-topology` if volumes are only accessible inside the node
where they get provisioned
- set the `NODE_NAME` environment variable to the name of the Kubernetes node
- implement `GetCapacity`

Expand Down Expand Up @@ -294,11 +298,10 @@ can own it.

The `--node-deployment-base-delay` parameter determines the initial
wait period. It also sets the jitter, so in practice the delay will be
in the range from zero to the base delay. After a collision, the delay
increases exponentially. If the value is high, volumes with immediate
binding get created more slowly. If it is low, then the risk of
conflicts while setting the "selected node" annotation increases and
the apiserver load will be higher.
in the range from zero to the base delay. If the value is high,
volumes with immediate binding get created more slowly. If it is low,
then the risk of conflicts while setting the "selected node"
annotation increases and the apiserver load will be higher.

There is an exponential backoff per PVC which is used for unexpected
problems. Normally, an owner for a PVC is chosen during the first
Expand Down
1 change: 1 addition & 0 deletions cmd/csi-provisioner/csi-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ func main() {
controller.Threadiness(int(*workerThreads)),
controller.CreateProvisionedPVLimiter(workqueue.DefaultControllerRateLimiter()),
controller.ClaimsInformer(claimInformer),
controller.NodesLister(nodeLister),
}

translator := csitrans.New()
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ replace k8s.io/component-base => k8s.io/component-base v0.19.0
replace k8s.io/controller-manager => k8s.io/controller-manager v0.19.0

replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.3

// node-informer branch = https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/pull/100
replace sigs.k8s.io/sig-storage-lib-external-provisioner/v6 => github.com/pohly/sig-storage-lib-external-provisioner/v6 v6.0.0-20201203095743-057b3397dbc4
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pohly/sig-storage-lib-external-provisioner/v6 v6.0.0-20201203095743-057b3397dbc4 h1:mh0dACPt4diFllwfL/NFPAeutj2wTYWEiDXsOqNG4v0=
github.com/pohly/sig-storage-lib-external-provisioner/v6 v6.0.0-20201203095743-057b3397dbc4/go.mod h1:DhZ52sQMJHW21+JXyA2LRUPRIxKnrNrwh+QFV+2tVA4=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
Expand Down Expand Up @@ -917,8 +919,6 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQb
sigs.k8s.io/controller-runtime v0.6.2 h1:jkAnfdTYBpFwlmBn3pS5HFO06SfxvnTZ1p5PeEF/zAA=
sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.1.0 h1:4kyxBJ/3fzLooWOZkx5NEO/pUN6woM9JBnHuyWzqkc8=
sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.1.0/go.mod h1:DhZ52sQMJHW21+JXyA2LRUPRIxKnrNrwh+QFV+2tVA4=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
Expand Down
3 changes: 2 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ sigs.k8s.io/controller-runtime/pkg/client
sigs.k8s.io/controller-runtime/pkg/client/apiutil
sigs.k8s.io/controller-runtime/pkg/client/fake
sigs.k8s.io/controller-runtime/pkg/internal/objectutil
# sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.1.0
# sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.1.0 => github.com/pohly/sig-storage-lib-external-provisioner/v6 v6.0.0-20201203095743-057b3397dbc4
## explicit
sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller
sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/metrics
Expand Down Expand Up @@ -595,3 +595,4 @@ sigs.k8s.io/yaml
# k8s.io/component-base => k8s.io/component-base v0.19.0
# k8s.io/controller-manager => k8s.io/controller-manager v0.19.0
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.3
# sigs.k8s.io/sig-storage-lib-external-provisioner/v6 => github.com/pohly/sig-storage-lib-external-provisioner/v6 v6.0.0-20201203095743-057b3397dbc4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0538807

Please sign in to comment.