Skip to content

Commit c98cf8b

Browse files
committed
make bsu volume count limit custom
1 parent 012d23b commit c98cf8b

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

CHANGELOG-0.x.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@
3737
# v0.0.13beta
3838
## Notable changes
3939
* Update default Max BSU Volumes value
40+
41+
# v0.0.14beta
42+
## Notable changes
43+
* Make Max BSU Volumes value custom

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.13beta |
49+
| OSC-MIGRATION branch |outscale/osc-ebs-csi-driver:v0.0.14beta |
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.13beta"
92+
export IMAGE_TAG="v0.0.14beta"
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

osc-bsu-csi-driver/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
2-
appVersion: "v0.0.13beta"
2+
appVersion: "v0.0.14beta"
33
name: osc-bsu-csi-driver
44
description: A Helm chart for Outscale BSU CSI Driver
5-
version: 0.5.0
5+
version: 0.6.0
66
kubeVersion: ">=1.14.0-0"
77
home: https://github.com/outscale-dev/osc-bsu-csi-driver
88
sources:

osc-bsu-csi-driver/templates/controller.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ spec:
6868
env:
6969
- name: CSI_ENDPOINT
7070
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
71+
7172
- name: OSC_ACCESS_KEY
7273
valueFrom:
7374
secretKeyRef:
@@ -84,6 +85,10 @@ spec:
8485
- name: AWS_REGION
8586
value: {{ .Values.region }}
8687
{{- end }}
88+
{{- if .Values.maxBsuVolumes }}
89+
- name: MAX_BSU_VOLUMES
90+
value: "{{ .Values.maxBsuVolumes }}"
91+
{{- end }}
8792
- name: BACKOFF_DURATION
8893
value: "{{ .Values.backoff.duration }}"
8994
- name: BACKOFF_FACTOR

osc-bsu-csi-driver/templates/node.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ spec:
6868
value: "{{ .Values.backoff.factor }}"
6969
- name: BACKOFF_STEPS
7070
value: "{{ .Values.backoff.steps }}"
71+
{{- if .Values.maxBsuVolumes }}
72+
- name: MAX_BSU_VOLUMES
73+
value: "{{ .Values.maxBsuVolumes }}"
74+
{{- end }}
7175
volumeMounts:
7276
- name: kubelet-dir
7377
mountPath: /var/lib/kubelet

osc-bsu-csi-driver/values.yaml

Lines changed: 4 additions & 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.13beta
9+
tag: v0.0.14beta
1010
pullPolicy: IfNotPresent
1111

1212
# set the verbosity level of plugins
@@ -102,6 +102,9 @@ k8sTagClusterId: ""
102102
# region: us-east-1
103103
region: ""
104104

105+
# Max bsu limits
106+
maxBsuVolumes: "25"
107+
105108
node:
106109
podAnnotations: {}
107110
tolerateAllTaints: true

pkg/driver/node.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,15 @@ func findScsiVolume(findName string) (device string, err error) {
638638

639639
// getVolumesLimit returns the limit of volumes that the node supports
640640
func (d *nodeService) getVolumesLimit() int64 {
641-
return defaultMaxBSUVolumes
641+
value := os.Getenv("MAX_BSU_VOLUMES")
642+
if value == "" {
643+
return defaultMaxBSUVolumes
644+
}
645+
max_value, err := strconv.Atoi(value)
646+
if err != nil {
647+
return defaultMaxBSUVolumes
648+
}
649+
return int64(max_value)
642650
}
643651

644652
// hasMountOption returns a boolean indicating whether the given

0 commit comments

Comments
 (0)