Skip to content

Commit 1b81b38

Browse files
committed
fix: metrics port and doc issue
1 parent 5420cd2 commit 1b81b38

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

charts/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ The following table lists the configurable parameters of the latest Azure Blob S
6464
| `serviceAccount.create` | whether create service account of csi-blob-controller | true |
6565
| `rbac.create` | whether create rbac of csi-blob-controller | true |
6666
| `controller.replicas` | the replicas of csi-blob-controller | 2 |
67+
| `controller.metricsPort` | metrics port of csi-blob-controller | 29634 |
68+
| `node.metricsPort` | metrics port of csi-blob-node | 29635 |
69+
6770
## Troubleshooting
6871

6972
If there are some errors when using helm to install, follow the steps to debug:

charts/latest/blob-csi-driver/templates/csi-blob-controller.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@ spec:
9090
args:
9191
- "--v=5"
9292
- "--endpoint=$(CSI_ENDPOINT)"
93+
- "--metrics-address=0.0.0.0:{{ .Values.controller.metricsPort }}"
9394
ports:
9495
- containerPort: 29632
9596
name: healthz
9697
protocol: TCP
97-
- containerPort: 29634
98+
- containerPort: {{ .Values.controller.metricsPort }}
9899
name: metrics
99100
protocol: TCP
100101
livenessProbe:

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ rbac:
2727
create: true
2828

2929
controller:
30+
metricsPort: 29634
3031
replicas: 2
3132

3233
node:
33-
metricsPort: 29625
34+
metricsPort: 29635

deploy/csi-blob-controller.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ spec:
8787
args:
8888
- "--v=5"
8989
- "--endpoint=$(CSI_ENDPOINT)"
90+
- "--metrics-address=0.0.0.0:29634"
9091
ports:
9192
- containerPort: 29632
9293
name: healthz

deploy/example/metrics/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driv
99
```console
1010
$ kubectl get svc csi-blob-controller -n kube-system
1111
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
12-
csi-blob-controller ClusterIP 10.0.156.8 <none> 29634/TCP 32m
12+
csi-blob-controller ClusterIP 10.0.156.8 20.39.0.113 29634/TCP 32m
1313
```
1414

1515
3. Run following command to get cloudprovider_azure metrics
1616
```console
17-
curl http://{CLUSTER-IP}:29634/metrics | grep cloudprovider_azure
18-
```
17+
ip=`kubectl get svc csi-blob-controller -n kube-system | grep blob | awk '{print $4}'`
18+
curl http://$ip:29634/metrics | grep cloudprovider_azure
19+
```

deploy/example/metrics/csi-blob-controller-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ spec:
1010
ports:
1111
- port: 29634
1212
targetPort: 29634
13-
type: ClusterIP
13+
type: LoadBalancer

pkg/blobplugin/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var (
3939
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
4040
nodeID = flag.String("nodeid", "", "node id")
4141
version = flag.Bool("version", false, "Print the version and exit.")
42-
metricsAddress = flag.String("metrics-address", "0.0.0.0:29624", "export the metrics")
42+
metricsAddress = flag.String("metrics-address", "0.0.0.0:29634", "export the metrics")
4343
kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
4444
)
4545

0 commit comments

Comments
 (0)