Skip to content

Commit 059ba64

Browse files
authored
Merge pull request #75 from Leaseweb/volume-expansion
Adding Volume Expansion Functionality
2 parents 50e718a + 13bf502 commit 059ba64

File tree

15 files changed

+334
-102
lines changed

15 files changed

+334
-102
lines changed

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ linters-settings:
2222
linters:
2323
disable-all: true
2424
enable:
25-
- deadcode
2625
- errcheck
2726
- gosimple
2827
- govet
2928
- ineffassign
3029
- staticcheck
3130
- stylecheck
3231
- goimports
33-
- structcheck
3432
- typecheck
3533
- unused
36-
- varcheck
3734
- misspell

cmd/cloudstack-csi-driver/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apk add --no-cache \
88
ca-certificates \
99
# Provides mkfs.ext2, mkfs.ext3, mkfs.ext4 (used by k8s.io/mount-utils)
1010
e2fsprogs \
11+
e2fsprogs-extra \
1112
# Provides mkfs.xfs
1213
xfsprogs \
1314
# Provides blkid, also used by k8s.io/mount-utils

cmd/cloudstack-csi-sc-syncer/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var (
2121
label = flag.String("label", "app.kubernetes.io/managed-by="+agent, "")
2222
namePrefix = flag.String("namePrefix", "cloudstack-", "")
2323
delete = flag.Bool("delete", false, "Delete")
24+
volumeExpansion = flag.Bool("volumeExpansion", false, "VolumeExpansion")
2425
showVersion = flag.Bool("version", false, "Show version")
2526

2627
// Version is set by the build process
@@ -43,6 +44,7 @@ func main() {
4344
Label: *label,
4445
NamePrefix: *namePrefix,
4546
Delete: *delete,
47+
VolumeExpansion: *volumeExpansion,
4648
})
4749
if err != nil {
4850
log.Fatalf("Error: %v", err)

deploy/k8s/controller-deployment.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# In this YAML file CloudStack CSI Controller contains the following sidecars:
2+
# external-attacher, external-provisioner, external-resizer, liveness-probe
13
apiVersion: apps/v1
24
kind: Deployment
35
metadata:
@@ -105,6 +107,26 @@ spec:
105107
- name: socket-dir
106108
mountPath: /var/lib/csi/sockets/pluginproxy/
107109

110+
- name: external-resizer
111+
image: registry.k8s.io/sig-storage/csi-resizer:v1.9.2
112+
args:
113+
- "--v=5"
114+
- "--csi-address=$(ADDRESS)"
115+
- --timeout=300s
116+
- --leader-election
117+
- --leader-election-lease-duration=120s
118+
- --leader-election-renew-deadline=60s
119+
- --leader-election-retry-period=30s
120+
- --kube-api-qps=100
121+
- --kube-api-burst=100
122+
env:
123+
- name: ADDRESS
124+
value: /var/lib/csi/sockets/pluginproxy/csi.sock
125+
imagePullPolicy: "IfNotPresent"
126+
volumeMounts:
127+
- name: socket-dir
128+
mountPath: /var/lib/csi/sockets/pluginproxy/
129+
108130
- name: liveness-probe
109131
image: registry.k8s.io/sig-storage/livenessprobe:v2.10.0
110132
args:

go.mod

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
module github.com/leaseweb/cloudstack-csi-driver
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/apache/cloudstack-go/v2 v2.15.0
7-
github.com/container-storage-interface/spec v1.8.0
7+
github.com/container-storage-interface/spec v1.9.0
88
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
99
github.com/hashicorp/go-uuid v1.0.3
10+
github.com/kubernetes-csi/csi-lib-utils v0.17.0
1011
github.com/kubernetes-csi/csi-test/v4 v4.4.0
1112
go.uber.org/zap v1.25.0
1213
golang.org/x/text v0.14.0
1314
google.golang.org/grpc v1.59.0
1415
gopkg.in/gcfg.v1 v1.2.3
15-
k8s.io/api v0.27.7
16-
k8s.io/apimachinery v0.27.7
17-
k8s.io/client-go v0.27.5
16+
k8s.io/api v0.29.0
17+
k8s.io/apimachinery v0.29.0
18+
k8s.io/client-go v0.29.0
1819
k8s.io/mount-utils v0.27.7
1920
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
2021
)
2122

2223
require (
2324
github.com/davecgh/go-spew v1.1.1 // indirect
24-
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
25+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
2526
github.com/fsnotify/fsnotify v1.4.9 // indirect
26-
github.com/go-logr/logr v1.2.3 // indirect
27-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
28-
github.com/go-openapi/jsonreference v0.20.1 // indirect
29-
github.com/go-openapi/swag v0.22.3 // indirect
27+
github.com/go-logr/logr v1.3.0 // indirect
28+
github.com/go-openapi/jsonpointer v0.20.2 // indirect
29+
github.com/go-openapi/jsonreference v0.20.4 // indirect
30+
github.com/go-openapi/swag v0.22.6 // indirect
3031
github.com/gogo/protobuf v1.3.2 // indirect
3132
github.com/golang/mock v1.6.0 // indirect
3233
github.com/golang/protobuf v1.5.3 // indirect
33-
github.com/google/gnostic v0.5.7-v3refs // indirect
34-
github.com/google/go-cmp v0.5.9 // indirect
35-
github.com/google/gofuzz v1.1.0 // indirect
34+
github.com/google/gnostic-models v0.6.8 // indirect
35+
github.com/google/go-cmp v0.6.0 // indirect
36+
github.com/google/gofuzz v1.2.0 // indirect
3637
github.com/google/uuid v1.3.1 // indirect
3738
github.com/imdario/mergo v0.3.6 // indirect
3839
github.com/josharian/intern v1.0.0 // indirect
@@ -44,25 +45,25 @@ require (
4445
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4546
github.com/nxadm/tail v1.4.8 // indirect
4647
github.com/onsi/ginkgo v1.16.5 // indirect
47-
github.com/onsi/gomega v1.27.4 // indirect
48+
github.com/onsi/gomega v1.29.0 // indirect
4849
github.com/spf13/pflag v1.0.5 // indirect
4950
go.uber.org/multierr v1.10.0 // indirect
50-
golang.org/x/net v0.17.0 // indirect
51+
golang.org/x/net v0.18.0 // indirect
5152
golang.org/x/oauth2 v0.11.0 // indirect
52-
golang.org/x/sys v0.13.0 // indirect
53-
golang.org/x/term v0.13.0 // indirect
54-
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
53+
golang.org/x/sys v0.15.0 // indirect
54+
golang.org/x/term v0.15.0 // indirect
55+
golang.org/x/time v0.5.0 // indirect
5556
google.golang.org/appengine v1.6.7 // indirect
56-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
57+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
5758
google.golang.org/protobuf v1.31.0 // indirect
5859
gopkg.in/inf.v0 v0.9.1 // indirect
5960
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
6061
gopkg.in/warnings.v0 v0.1.2 // indirect
6162
gopkg.in/yaml.v2 v2.4.0 // indirect
6263
gopkg.in/yaml.v3 v3.0.1 // indirect
63-
k8s.io/klog/v2 v2.90.1 // indirect
64-
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
64+
k8s.io/klog/v2 v2.110.1 // indirect
65+
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
6566
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
66-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
67+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
6768
sigs.k8s.io/yaml v1.3.0 // indirect
6869
)

0 commit comments

Comments
 (0)