Skip to content

Commit 2fbdd9c

Browse files
committed
Change PV and PVC status capacity on resize
We add the interface for volume expansion. This will not have any effect on the underlying volume, but will change properly the PV capacity and PVC status when a claim is made, and the proper events will be produced as well. To do that the external-resizer is used provided by Kubernetes for this purpose. Signed-off-by: Marjus Cako <marios.cako@gmail.com>
1 parent fe4717c commit 2fbdd9c

File tree

1,163 files changed

+103062
-18411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,163 files changed

+103062
-18411
lines changed

deploy/local-path-storage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ rules:
3939
- apiGroups: ["storage.k8s.io"]
4040
resources: ["storageclasses"]
4141
verbs: ["get", "list", "watch"]
42+
- apiGroups: [ "" ]
43+
resources: [ "persistentvolumeclaims/status" ]
44+
verbs: [ "patch" ]
4245

4346
---
4447
apiVersion: rbac.authorization.k8s.io/v1

examples/quota/local-path-storage.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ rules:
3939
- apiGroups: ["storage.k8s.io"]
4040
resources: ["storageclasses"]
4141
verbs: ["get", "list", "watch"]
42-
42+
- apiGroups: [ "" ]
43+
resources: [ "persistentvolumeclaims/status" ]
44+
verbs: [ "patch" ]
4345
---
4446
apiVersion: rbac.authorization.k8s.io/v1
4547
kind: RoleBinding

go.mod

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,77 @@ go 1.21
55
require (
66
github.com/Sirupsen/logrus v0.11.0
77
github.com/kelseyhightower/envconfig v1.4.0
8+
github.com/kubernetes-csi/external-resizer v1.10.0
89
github.com/pkg/errors v0.9.1
9-
github.com/stretchr/testify v1.8.2
10+
github.com/stretchr/testify v1.8.4
1011
github.com/urfave/cli v1.19.1
11-
k8s.io/api v0.28.4
12-
k8s.io/apimachinery v0.28.4
13-
k8s.io/client-go v0.28.4
14-
k8s.io/klog/v2 v2.100.1
12+
k8s.io/api v0.29.0
13+
k8s.io/apimachinery v0.29.0
14+
k8s.io/client-go v0.29.0
15+
k8s.io/klog/v2 v2.110.1
1516
sigs.k8s.io/sig-storage-lib-external-provisioner/v8 v8.0.0
1617
sigs.k8s.io/yaml v1.3.0
1718
)
1819

1920
require (
21+
cloud.google.com/go/compute v1.23.2 // indirect
2022
github.com/beorn7/perks v1.0.1 // indirect
21-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
23+
github.com/blang/semver/v4 v4.0.0 // indirect
24+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
25+
github.com/container-storage-interface/spec v1.9.0 // indirect
2226
github.com/davecgh/go-spew v1.1.1 // indirect
23-
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
24-
github.com/go-logr/logr v1.2.4 // indirect
27+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
28+
github.com/go-logr/logr v1.3.0 // indirect
29+
github.com/go-logr/stdr v1.2.2 // indirect
2530
github.com/go-openapi/jsonpointer v0.19.6 // indirect
2631
github.com/go-openapi/jsonreference v0.20.2 // indirect
2732
github.com/go-openapi/swag v0.22.3 // indirect
2833
github.com/gogo/protobuf v1.3.2 // indirect
2934
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3035
github.com/golang/protobuf v1.5.3 // indirect
3136
github.com/google/gnostic-models v0.6.8 // indirect
32-
github.com/google/go-cmp v0.5.9 // indirect
37+
github.com/google/go-cmp v0.6.0 // indirect
3338
github.com/google/gofuzz v1.2.0 // indirect
34-
github.com/google/uuid v1.3.0 // indirect
35-
github.com/imdario/mergo v0.3.6 // indirect
39+
github.com/google/uuid v1.3.1 // indirect
40+
github.com/imdario/mergo v0.3.12 // indirect
3641
github.com/josharian/intern v1.0.0 // indirect
3742
github.com/json-iterator/go v1.1.12 // indirect
43+
github.com/kubernetes-csi/csi-lib-utils v0.17.0 // indirect
3844
github.com/mailru/easyjson v0.7.7 // indirect
39-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
45+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4046
github.com/miekg/dns v1.1.29 // indirect
4147
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4248
github.com/modern-go/reflect2 v1.0.2 // indirect
4349
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4450
github.com/pmezard/go-difflib v1.0.0 // indirect
45-
github.com/prometheus/client_golang v1.11.1 // indirect
46-
github.com/prometheus/client_model v0.3.0 // indirect
47-
github.com/prometheus/common v0.32.1 // indirect
48-
github.com/prometheus/procfs v0.8.0 // indirect
51+
github.com/prometheus/client_golang v1.16.0 // indirect
52+
github.com/prometheus/client_model v0.4.0 // indirect
53+
github.com/prometheus/common v0.44.0 // indirect
54+
github.com/prometheus/procfs v0.10.1 // indirect
4955
github.com/spf13/pflag v1.0.5 // indirect
50-
golang.org/x/crypto v0.14.0 // indirect
51-
golang.org/x/net v0.17.0 // indirect
52-
golang.org/x/oauth2 v0.8.0 // indirect
53-
golang.org/x/sys v0.13.0 // indirect
54-
golang.org/x/term v0.13.0 // indirect
55-
golang.org/x/text v0.13.0 // indirect
56+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.44.0 // indirect
57+
go.opentelemetry.io/otel v1.19.0 // indirect
58+
go.opentelemetry.io/otel/metric v1.19.0 // indirect
59+
go.opentelemetry.io/otel/trace v1.19.0 // indirect
60+
golang.org/x/crypto v0.15.0 // indirect
61+
golang.org/x/net v0.18.0 // indirect
62+
golang.org/x/oauth2 v0.13.0 // indirect
63+
golang.org/x/sys v0.14.0 // indirect
64+
golang.org/x/term v0.14.0 // indirect
65+
golang.org/x/text v0.14.0 // indirect
5666
golang.org/x/time v0.3.0 // indirect
57-
google.golang.org/appengine v1.6.7 // indirect
67+
google.golang.org/appengine v1.6.8 // indirect
68+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
69+
google.golang.org/grpc v1.60.1 // indirect
5870
google.golang.org/protobuf v1.31.0 // indirect
5971
gopkg.in/inf.v0 v0.9.1 // indirect
6072
gopkg.in/yaml.v2 v2.4.0 // indirect
6173
gopkg.in/yaml.v3 v3.0.1 // indirect
62-
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
63-
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
74+
k8s.io/apiserver v0.28.0 // indirect
75+
k8s.io/component-base v0.29.0 // indirect
76+
k8s.io/csi-translation-lib v0.29.0 // indirect
77+
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
78+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
6479
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
65-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
80+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
6681
)

0 commit comments

Comments
 (0)