Skip to content

Commit c7e7316

Browse files
committed
fix maximum number of volumes per vm
1 parent 0e356a7 commit c7e7316

File tree

10 files changed

+33
-22
lines changed

10 files changed

+33
-22
lines changed

.trivyignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ CVE-2019-19882
4141
CVE-2011-4116
4242
# unimportant https://security-tracker.debian.org/tracker/CVE-2005-2541
4343
CVE-2005-2541
44+
#No fix https://security-tracker.debian.org/tracker/CVE-2021-43396
45+
CVE-2021-43396
46+
#No fix https://security-tracker.debian.org/tracker/CVE-2021-39537
47+
CVE-2021-39537

CHANGELOG-0.x.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@
3333
* update to csi 1.3.0
3434
* Update charts and sidecars versions
3535
* update e2e tests
36+
37+
# v0.0.13beta
38+
## Notable changes
39+
* Update default Max BSU Volumes value

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ RUN echo "deb http://deb.debian.org/debian testing non-free contrib main" >> /et
66
RUN apt-get -y update && \
77
apt-get -y install libc-bin=2.32-4 \
88
ca-certificates=20210119 \
9-
e2fsprogs=1.46.2-2 mount=2.37.2-3 \
10-
udev=247.9-3 util-linux=2.37.2-3 \
9+
e2fsprogs=1.46.2-2 mount=2.37.2-4 \
10+
udev=249.5-2 util-linux=2.37.2-4 \
1111
xfsprogs=5.10.0-4 --no-install-recommends && \
1212
apt-get clean && rm -rf /var/lib/apt/lists/*
1313

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
4646
## Container Images:
4747
|OSC BSU CSI Driver Version | Image |
4848
|---------------------------|-------------------------------------------|
49-
| OSC-MIGRATION branch |outscale/osc-ebs-csi-driver:v0.0.12beta |
49+
| OSC-MIGRATION branch |outscale/osc-ebs-csi-driver:v0.0.13beta |
5050

5151
## Features
5252
* **Static Provisioning** - create a new or migrating existing BSU volumes, then create persistence volume (PV) from the BSU volume and consume the PV from container using persistence volume claim (PVC).
@@ -89,7 +89,7 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll
8989
9090
## deploy the pod
9191
export IMAGE_NAME=outscale/osc-ebs-csi-driver
92-
export IMAGE_TAG="v0.0.12beta"
92+
export IMAGE_TAG="v0.0.13beta"
9393
git clone git@github.com:outscale-dev/osc-bsu-csi-driver.git
9494
cd osc-bsu-csi-driver
9595
helm uninstall osc-bsu-csi-driver --namespace kube-system

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ require (
1515
github.com/kr/text v0.2.0 // indirect
1616
github.com/kubernetes-csi/csi-test v2.0.0+incompatible
1717
github.com/kubernetes-csi/external-snapshotter/client/v3 v3.0.0
18+
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
1819
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
1920
github.com/onsi/ginkgo v1.16.4
2021
github.com/onsi/gomega v1.16.0

go.sum

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm
9696
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
9797
github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
9898
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
99+
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
99100
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
100101
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
101102
github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E=
@@ -457,8 +458,11 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
457458
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
458459
github.com/kubernetes-csi/csi-test v2.0.0+incompatible h1:ia04uVFUM/J9n/v3LEMn3rEG6FmKV5BH9QLw7H68h44=
459460
github.com/kubernetes-csi/csi-test v2.0.0+incompatible/go.mod h1:YxJ4UiuPWIhMBkxUKY5c267DyA0uDZ/MtAimhx/2TA0=
461+
github.com/kubernetes-csi/external-snapshotter v1.2.2 h1:OPXoJydNqkWjhLwJ20dSqOhkmUYcpm+CCO0pYm+C8Q8=
460462
github.com/kubernetes-csi/external-snapshotter/client/v3 v3.0.0 h1:OYDCOjVcx/5wNzlZ/At8otRibUlw0T6R0xOD31f32bw=
461463
github.com/kubernetes-csi/external-snapshotter/client/v3 v3.0.0/go.mod h1:Q7VUue/CIrKbtpBdF04a1yjGGgsMaDws1HUxtjzgnEY=
464+
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA=
465+
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys=
462466
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
463467
github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc=
464468
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
@@ -503,6 +507,7 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
503507
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
504508
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
505509
github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ=
510+
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
506511
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
507512
github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
508513
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
@@ -553,6 +558,7 @@ github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl
553558
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
554559
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
555560
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
561+
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
556562
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
557563
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
558564
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
@@ -604,6 +610,7 @@ github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7z
604610
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
605611
github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
606612
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
613+
github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
607614
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
608615
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
609616
github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
@@ -729,6 +736,7 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh
729736
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
730737
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
731738
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
739+
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
732740
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
733741
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
734742
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1114,6 +1122,7 @@ k8s.io/component-base v0.19.4 h1:HobPRToQ8KJ9ubRju6PUAk9I5V1GNMJZ4PyWbiWA0uI=
11141122
k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70=
11151123
k8s.io/component-base v0.21.5 h1:icFqcFDrO9S+FQpGohzVm6qce9vlo131K0r3NhElxiQ=
11161124
k8s.io/component-base v0.21.5/go.mod h1:UyRaqQfPkBL/haEFaMWgVQvtom5TqAT+jqlFGlh6LuU=
1125+
k8s.io/component-helpers v0.21.5 h1:NzRIDAmDk0tJw2OSvDIlkXQ/j96MUKW0PF/htVH6S1g=
11171126
k8s.io/component-helpers v0.21.5/go.mod h1:sjHa2QESu4iHcL20eSKyIvCYEKdxQyS3LthUe10tt0k=
11181127
k8s.io/controller-manager v0.21.5/go.mod h1:65guJmOoIEklTPwwYOmiHOsbEoAnQ7xKSZ9v+RdJC6g=
11191128
k8s.io/cri-api v0.19.4/go.mod h1:UN/iU9Ua0iYdDREBXNE9vqCJ7MIh/FW3VIL0d8pw7Fw=
@@ -1143,8 +1152,10 @@ k8s.io/kube-scheduler v0.19.4/go.mod h1:r0SdH7fwIKyA/MURcRS4jNjTjfBEju3oIBll0Dxq
11431152
k8s.io/kube-scheduler v0.21.5/go.mod h1:7hWWLzvl0yEr+gm2Kfvt1wikhXwQb2BNylvOwzSlSMM=
11441153
k8s.io/kubectl v0.19.4 h1:XFrHibf5fS4Ot8h3EnzdVsKrYj+pndlzKbwPkfra5hI=
11451154
k8s.io/kubectl v0.19.4/go.mod h1:XPmlu4DJEYgD83pvZFeKF8+MSvGnYGqunbFSrJsqHv0=
1155+
k8s.io/kubectl v0.21.5 h1:Ov5ivI1SanAoVPI/n6/Sik+MQTaeGp7U2S02loXBB/s=
11461156
k8s.io/kubectl v0.21.5/go.mod h1:1dDgqGZdQWH6IOLozcxQ3Tyvc5CnEL1Int6St4XEV8w=
11471157
k8s.io/kubelet v0.19.4/go.mod h1:zJnPeb7nJCRvtAwxJhe9fFCtMLXL3cXbQiczPmpDrLU=
1158+
k8s.io/kubelet v0.21.5 h1:XPc6L3qcw/XM8HE2P6zBGyffghblWEbw5dj9XboeHhA=
11481159
k8s.io/kubelet v0.21.5/go.mod h1:yVKsH4usaXy40Z3cZ8jknE70obOF/4aFNB7bittEEZ0=
11491160
k8s.io/kubernetes v1.19.11 h1:5EjBuGr2Lg6dDMHkhsfaE4G7axq+0JnK19jcoSWdER4=
11501161
k8s.io/kubernetes v1.19.11/go.mod h1:f09eWYx+kAUzGrdf+qSQElQ1+HgCsN/ezDXq/XWyaOM=
@@ -1176,6 +1187,7 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
11761187
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
11771188
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9 h1:rusRLrDhjBp6aYtl9sGEvQJr6faoHoDLd0YcUBTZguI=
11781189
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0=
1190+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22 h1:fmRfl9WJ4ApJn7LxNuED4m0t18qivVQOxP6aAYG9J6c=
11791191
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
11801192
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
11811193
sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY=

osc-bsu-csi-driver/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
2-
appVersion: "v0.0.12beta"
2+
appVersion: "v0.0.13beta"
33
name: osc-bsu-csi-driver
44
description: A Helm chart for Outscale BSU CSI Driver
55
version: 0.5.0

osc-bsu-csi-driver/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 2
66

77
image:
88
repository: outscale/osc-ebs-csi-driver
9-
tag: v0.0.12beta
9+
tag: v0.0.13beta
1010
pullPolicy: IfNotPresent
1111

1212
# set the verbosity level of plugins

pkg/driver/node.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"fmt"
2222
"os"
2323
"path/filepath"
24-
"regexp"
2524
"strconv"
2625
"strings"
2726

@@ -50,12 +49,9 @@ const (
5049
// default file system type to be used when it is not provided
5150
defaultFsType = FSTypeExt4
5251

53-
// defaultMaxEBSVolumes is the maximum number of volumes that an AWS instance can have attached.
54-
// More info at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html
55-
defaultMaxEBSVolumes = 39
56-
57-
// defaultMaxEBSNitroVolumes is the limit of volumes for some smaller instances, like c5 and m5.
58-
defaultMaxEBSNitroVolumes = 25
52+
// defaultMaxBSUVolumes is the maximum number of volumes that an OSC instance can have attached.
53+
// https://wiki.outscale.net/display/EN/About+Volumes#AboutVolumes-VolumesInstancesVolumesandInstances
54+
defaultMaxBSUVolumes = 25
5955
)
6056

6157
var (
@@ -642,12 +638,7 @@ func findScsiVolume(findName string) (device string, err error) {
642638

643639
// getVolumesLimit returns the limit of volumes that the node supports
644640
func (d *nodeService) getVolumesLimit() int64 {
645-
ebsNitroInstanceTypeRegex := "^[cmr]5.*|t3|z1d"
646-
instanceType := d.metadata.GetInstanceType()
647-
if ok, _ := regexp.MatchString(ebsNitroInstanceTypeRegex, instanceType); ok {
648-
return defaultMaxEBSNitroVolumes
649-
}
650-
return defaultMaxEBSVolumes
641+
return defaultMaxBSUVolumes
651642
}
652643

653644
// hasMountOption returns a boolean indicating whether the given

pkg/driver/node_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,14 +1357,14 @@ func TestNodeGetInfo(t *testing.T) {
13571357
instanceID: "i-123456789abcdef01",
13581358
instanceType: "t2.medium",
13591359
availabilityZone: "us-west-2b",
1360-
expMaxVolumes: 39,
1360+
expMaxVolumes: defaultMaxBSUVolumes,
13611361
},
13621362
{
13631363
name: "success normal with NVMe",
13641364
instanceID: "i-123456789abcdef01",
13651365
instanceType: "m5d.large",
13661366
availabilityZone: "us-west-2b",
1367-
expMaxVolumes: 25,
1367+
expMaxVolumes: defaultMaxBSUVolumes,
13681368
},
13691369
}
13701370
for _, tc := range testCases {
@@ -1374,7 +1374,6 @@ func TestNodeGetInfo(t *testing.T) {
13741374

13751375
mockMetadata := mocks.NewMockMetadataService(mockCtl)
13761376
mockMetadata.EXPECT().GetInstanceID().Return(tc.instanceID)
1377-
mockMetadata.EXPECT().GetInstanceType().Return(tc.instanceType)
13781377
mockMetadata.EXPECT().GetAvailabilityZone().Return(tc.availabilityZone)
13791378

13801379
mockMounter := mocks.NewMockMounter(mockCtl)

0 commit comments

Comments
 (0)