Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1197 from kubernetes-sigs/remove-n…
Browse files Browse the repository at this point in the history
…ode-metrics-address

cleanup: remove metrics-address on driver daemonset on the node
  • Loading branch information
andyzhangx authored Feb 23, 2023
2 parents 9835735 + f07eb2f commit 141ab79
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ The following table lists the configurable parameters of the latest Azure File C
| `node.allowEmptyCloudConfig` | Whether allow running node driver without cloud config | `true`
| `node.allowInlineVolumeKeyAccessWithIdentity` | Whether allow accessing storage account key using cluster identity for inline volume | `false`
| `node.maxUnavailable` | `maxUnavailable` value of driver node daemonset | `1`
| `node.metricsPort` | metrics port of csi-azurefile-node |`29615` |
| `node.livenessProbe.healthPort ` | health check port for liveness probe | `29613` |
| `node.logLevel` | node driver log level |`5` |
| `snapshot.enabled` | whether enable snapshot feature | `false` |
Expand Down
Binary file modified charts/latest/azurefile-csi-driver-v0.0.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ spec:
- "--v={{ .Values.node.logLevel }}"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
- "--metrics-address=0.0.0.0:{{ .Values.node.metricsPort }}"
- "--kubeconfig={{ .Values.windows.kubeconfig }}"
- "--drivername={{ .Values.driver.name }}"
- "--cloud-config-secret-name={{ .Values.node.cloudConfigSecretName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ spec:
- "--v={{ .Values.node.logLevel }}"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
- "--metrics-address=0.0.0.0:{{ .Values.node.metricsPort }}"
- "--kubeconfig={{ .Values.linux.kubeconfig }}"
- "--drivername={{ .Values.driver.name }}"
- "--cloud-config-secret-name={{ .Values.node.cloudConfigSecretName }}"
Expand Down
1 change: 0 additions & 1 deletion charts/latest/azurefile-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ node:
cloudConfigSecretNamespace: kube-system
allowEmptyCloudConfig: true
allowInlineVolumeKeyAccessWithIdentity: false
metricsPort: 29615
livenessProbe:
healthPort: 29613
logLevel: 5
Expand Down
1 change: 0 additions & 1 deletion deploy/csi-azurefile-node-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ spec:
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
- --kubeconfig=C:\\k\\config
- --metrics-address=0.0.0.0:29615
ports:
- containerPort: 29613
name: healthz
Expand Down
1 change: 0 additions & 1 deletion deploy/csi-azurefile-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ spec:
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
- "--metrics-address=0.0.0.0:29615"
ports:
- containerPort: 29613
name: healthz
Expand Down
5 changes: 4 additions & 1 deletion pkg/azurefileplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
nodeID = flag.String("nodeid", "", "node id")
version = flag.Bool("version", false, "Print the version and exit.")
metricsAddress = flag.String("metrics-address", "0.0.0.0:29614", "export the metrics")
metricsAddress = flag.String("metrics-address", "", "export the metrics")
kubeconfig = flag.String("kubeconfig", "", "Absolute path to the kubeconfig file. Required only when running out of cluster.")
driverName = flag.String("drivername", azurefile.DefaultDriverName, "name of the driver")
cloudConfigSecretName = flag.String("cloud-config-secret-name", "azure-cloud-provider", "secret name of cloud config")
Expand Down Expand Up @@ -106,6 +106,9 @@ func handle() {
}

func exportMetrics() {
if *metricsAddress == "" {
return
}
l, err := net.Listen("tcp", *metricsAddress)
if err != nil {
klog.Warningf("failed to get listener for metrics endpoint: %v", err)
Expand Down

0 comments on commit 141ab79

Please # to comment.