Skip to content

Commit

Permalink
Change PV and PVC status capacity on resize
Browse files Browse the repository at this point in the history
We add the proper 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 <[email protected]>
  • Loading branch information
marjus45 committed Jul 30, 2023
1 parent 4d42c70 commit 90bb109
Show file tree
Hide file tree
Showing 2,244 changed files with 357,312 additions and 40,741 deletions.
3 changes: 3 additions & 0 deletions deploy/local-path-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ kind: ClusterRole
metadata:
name: local-path-provisioner-role
rules:
- apiGroups: [ "" ]
resources: [ "persistentvolumeclaims/status" ]
verbs: [ "patch" ]
- apiGroups: [ "" ]
resources: [ "nodes", "persistentvolumeclaims", "configmaps" ]
verbs: [ "get", "list", "watch" ]
Expand Down
3 changes: 3 additions & 0 deletions examples/quota/local-path-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ kind: ClusterRole
metadata:
name: local-path-provisioner-role
rules:
- apiGroups: [ "" ]
resources: [ "persistentvolumeclaims/status" ]
verbs: [ "patch" ]
- apiGroups: [ "" ]
resources: [ "nodes", "persistentvolumeclaims", "configmaps" ]
verbs: [ "get", "list", "watch" ]
Expand Down
60 changes: 38 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,50 @@ go 1.17
require (
github.com/Sirupsen/logrus v0.11.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/kubernetes-csi/external-resizer v1.8.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.1
github.com/urfave/cli v1.19.1
k8s.io/api v0.19.1
k8s.io/apimachinery v0.19.1
k8s.io/client-go v0.19.1
k8s.io/klog/v2 v2.3.0
k8s.io/api v0.27.0
k8s.io/apimachinery v0.27.0
k8s.io/client-go v0.27.0
k8s.io/klog/v2 v2.90.1
sigs.k8s.io/sig-storage-lib-external-provisioner/v8 v8.0.0
sigs.k8s.io/yaml v1.2.0
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/container-storage-interface/spec v1.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v0.2.0 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.13.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/miekg/dns v1.1.29 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.7.0 // indirect
Expand All @@ -49,11 +59,17 @@ require (
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 // indirect
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiserver v0.27.0 // indirect
k8s.io/component-base v0.27.0 // indirect
k8s.io/csi-translation-lib v0.27.0 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Loading

0 comments on commit 90bb109

Please sign in to comment.