Skip to content

Commit 500e54d

Browse files
committed
feat: remove mlocate by default to save account list usage
1 parent 799adb4 commit 500e54d

File tree

6 files changed

+43
-24
lines changed

6 files changed

+43
-24
lines changed

charts/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ The following table lists the configurable parameters of the latest Azure Blob S
7777
| `image.csiResizer.tag` | csi-resizer docker image tag | `v1.3.0` |
7878
| `image.csiResizer.pullPolicy` | csi-resizer image pull policy | `IfNotPresent` |
7979
| `imagePullSecrets` | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
80+
| `cloud` | the cloud environment the driver is running on | `AzurePublicCloud` |
81+
| `podAnnotations` | collection of annotations to add to all the pods | {} |
82+
| `podLabels` | collection of labels to add to all the pods | {} |
8083
| `customLabels` | Custom labels to add into metadata | `{}` |
84+
| `priorityClassName` | priority class name to be added to pods | `system-cluster-critical` |
85+
| `securityContext` | security context to be added to pods | {} |
8186
| `serviceAccount.create` | whether create service account of csi-blob-controller | `true` |
8287
| `serviceAccount.controller` | name of service account for csi-blob-controller | `csi-blob-controller-sa` |
8388
| `serviceAccount.node` | name of service account for csi-blob-node | `csi-blob-node-sa` |
@@ -124,6 +129,7 @@ The following table lists the configurable parameters of the latest Azure Blob S
124129
| `node.blobfuseProxy.blobfuseVersion` | installed blobfuse version on agent node| `1.4.1` |
125130
| `node.blobfuseProxy.setMaxOpenFileNum` | whether set max open file num on agent node| `true` |
126131
| `node.blobfuseProxy.maxOpenFileNum` | max open file num on agent node| `9000000` |
132+
| `node.blobfuseProxy.removeMlocate` | whether remove `/etc/cron.daily/mlocate` (saving storage account list usage) | `true` |
127133
| `node.blobfuseCachePath` | blobfuse cache path(`tmp-path`) | `/mnt` |
128134
| `node.resources.livenessProbe.limits.cpu` | liveness-probe cpu limits | 1 |
129135
| `node.resources.livenessProbe.limits.memory` | liveness-probe memory limits | 100Mi |
@@ -142,11 +148,6 @@ The following table lists the configurable parameters of the latest Azure Blob S
142148
| `node.tolerations` | node pod tolerations | [] |
143149
| `linux.kubelet` | configure kubelet directory path on Linux agent node node | `/var/lib/kubelet` |
144150
| `linux.distro` | configure ssl certificates for different Linux distribution(available values: `debian`, `fedora`) | `debian`
145-
| `cloud` | the cloud environment the driver is running on | `AzurePublicCloud` |
146-
| `podAnnotations` | collection of annotations to add to all the pods | {} |
147-
| `podLabels` | collection of labels to add to all the pods | {} |
148-
| `priorityClassName` | priority class name to be added to pods | `system-cluster-critical` |
149-
| `securityContext` | security context to be added to pods | {} |
150151

151152
## troubleshooting
152153
- Add `--wait -v=5 --debug` in `helm install` command to get detailed error
63 Bytes
Binary file not shown.

charts/latest/blob-csi-driver/templates/blobfuse-proxy.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ spec:
6767
sysctl -w fs.file-max=${MAX_FILE_NUM}
6868
fi
6969
70+
REMOVE_MLOCATE=${REMOVE_MLOCATE:-true}
71+
if (( "${REMOVE_MLOCATE}" == "true" ))
72+
then
73+
rm /etc/cron.daily/mlocate -f
74+
fi
75+
7076
# "waiting for blobfuse-proxy service to start"
7177
sleep 3s
7278
# tail blobfuse proxy logs
@@ -89,9 +95,11 @@ spec:
8995
value: "{{ .Values.node.blobfuseProxy.setMaxOpenFileNum }}"
9096
- name: MAX_FILE_NUM
9197
value: "{{ .Values.node.blobfuseProxy.maxOpenFileNum }}"
98+
- name: REMOVE_MLOCATE
99+
value: "{{ .Values.node.blobfuseProxy.removeMlocate }}"
92100
resources:
93101
limits:
94-
cpu: 200m
102+
cpu: 1
95103
memory: 200Mi
96104
requests:
97105
cpu: 10m

charts/latest/blob-csi-driver/values.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ image:
2121
tag: v1.3.0
2222
pullPolicy: IfNotPresent
2323

24+
cloud: AzurePublicCloud
25+
2426
## Reference to one or more secrets to be used when pulling images
2527
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
2628
imagePullSecrets: []
2729
# - name: myRegistryKeySecretName
2830

29-
# -- Custom labels to add into metadata
30-
customLabels: {}
31-
# k8s-app: blob-csi-driver
32-
3331
serviceAccount:
3432
create: true # When true, service accounts will be created for you. Set to false if you want to use your own.
3533
controller: csi-blob-controller-sa # Name of Service Account to be created or used
@@ -39,6 +37,22 @@ rbac:
3937
create: true
4038
name: blob
4139

40+
## Collection of annotations to add to all the pods
41+
podAnnotations: {}
42+
## Collection of labels to add to all the pods
43+
podLabels: {}
44+
# -- Custom labels to add into metadata
45+
customLabels: {}
46+
# k8s-app: blob-csi-driver
47+
48+
## Leverage a PriorityClass to ensure your pods survive resource shortages
49+
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
50+
priorityClassName: system-cluster-critical
51+
## Security context give the opportunity to run container as nonroot by setting a securityContext
52+
## by example :
53+
## securityContext: { runAsUser: 1001 }
54+
securityContext: {}
55+
4256
controller:
4357
name: csi-blob-controller
4458
cloudConfigSecretName: azure-cloud-provider
@@ -106,6 +120,7 @@ node:
106120
blobfuseVersion: 1.4.1
107121
setMaxOpenFileNum: true
108122
maxOpenFileNum: "9000000"
123+
removeMlocate: true
109124
blobfuseCachePath: /mnt
110125
resources:
111126
livenessProbe:
@@ -148,17 +163,3 @@ driver:
148163
linux:
149164
kubelet: /var/lib/kubelet
150165
distro: debian
151-
152-
cloud: AzurePublicCloud
153-
154-
## Collection of annotations to add to all the pods
155-
podAnnotations: {}
156-
## Collection of labels to add to all the pods
157-
podLabels: {}
158-
## Leverage a PriorityClass to ensure your pods survive resource shortages
159-
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
160-
priorityClassName: system-cluster-critical
161-
## Security context give the opportunity to run container as nonroot by setting a securityContext
162-
## by example :
163-
## securityContext: { runAsUser: 1001 }
164-
securityContext: {}

deploy/blobfuse-proxy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ spec:
6161
sysctl -w fs.file-max=${MAX_FILE_NUM}
6262
fi
6363
64+
REMOVE_MLOCATE=${REMOVE_MLOCATE:-true}
65+
if (( "${REMOVE_MLOCATE}" == "true" ))
66+
then
67+
rm /etc/cron.daily/mlocate -f
68+
fi
69+
6470
# "waiting for blobfuse-proxy service to start"
6571
sleep 3s
6672
# tail blobfuse proxy logs
@@ -79,6 +85,8 @@ spec:
7985
value: "true"
8086
- name: MAX_FILE_NUM
8187
value: "9000000"
88+
- name: REMOVE_MLOCATE
89+
value: "true"
8290
resources:
8391
limits:
8492
cpu: 1

deploy/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ resources:
77
- csi-blob-node.yaml
88
- rbac-csi-blob-controller.yaml
99
- rbac-csi-blob-node.yaml
10+
- blobfuse-proxy.yaml

0 commit comments

Comments
 (0)