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

Adding Volume Expansion Functionality #75

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@ linters-settings:
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- stylecheck
- goimports
- structcheck
- typecheck
- unused
- varcheck
- misspell
1 change: 1 addition & 0 deletions cmd/cloudstack-csi-driver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apk add --no-cache \
ca-certificates \
# Provides mkfs.ext2, mkfs.ext3, mkfs.ext4 (used by k8s.io/mount-utils)
e2fsprogs \
e2fsprogs-extra \
# Provides mkfs.xfs
xfsprogs \
# Provides blkid, also used by k8s.io/mount-utils
Expand Down
2 changes: 2 additions & 0 deletions cmd/cloudstack-csi-sc-syncer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
label = flag.String("label", "app.kubernetes.io/managed-by="+agent, "")
namePrefix = flag.String("namePrefix", "cloudstack-", "")
delete = flag.Bool("delete", false, "Delete")
volumeExpansion = flag.Bool("volumeExpansion", false, "VolumeExpansion")
showVersion = flag.Bool("version", false, "Show version")

// Version is set by the build process
Expand All @@ -43,6 +44,7 @@ func main() {
Label: *label,
NamePrefix: *namePrefix,
Delete: *delete,
VolumeExpansion: *volumeExpansion,
})
if err != nil {
log.Fatalf("Error: %v", err)
Expand Down
22 changes: 22 additions & 0 deletions deploy/k8s/controller-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# In this YAML file CloudStack CSI Controller contains the following sidecars:
# external-attacher, external-provisioner, external-resizer, liveness-probe
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -105,6 +107,26 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/

- name: external-resizer
image: registry.k8s.io/sig-storage/csi-resizer:v1.9.2
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- --timeout=300s
- --leader-election
- --leader-election-lease-duration=120s
- --leader-election-renew-deadline=60s
- --leader-election-retry-period=30s
- --kube-api-qps=100
- --kube-api-burst=100
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/

- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.10.0
args:
Expand Down
45 changes: 23 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
module github.com/leaseweb/cloudstack-csi-driver

go 1.20
go 1.21

require (
github.com/apache/cloudstack-go/v2 v2.15.0
github.com/container-storage-interface/spec v1.8.0
github.com/container-storage-interface/spec v1.9.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/go-uuid v1.0.3
github.com/kubernetes-csi/csi-lib-utils v0.17.0
github.com/kubernetes-csi/csi-test/v4 v4.4.0
go.uber.org/zap v1.25.0
golang.org/x/text v0.14.0
google.golang.org/grpc v1.59.0
gopkg.in/gcfg.v1 v1.2.3
k8s.io/api v0.27.7
k8s.io/apimachinery v0.27.7
k8s.io/client-go v0.27.5
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
k8s.io/mount-utils v0.27.7
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // 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/go-logr/logr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -44,25 +45,25 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.4 // indirect
github.com/onsi/gomega v1.29.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading
Loading