From 175887bb4d7990ee7e5a5aac629bbeb58d716111 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 10 Feb 2020 04:42:36 +0000 Subject: [PATCH] chore: change port num --- .../templates/csi-azurefile-controller.yaml | 21 ++++--------------- .../templates/csi-azurefile-node.yaml | 4 ++-- deploy/crd-csi-driver-registry.yaml | 7 ++++--- deploy/crd-csi-node-info.yaml | 1 + deploy/csi-azurefile-controller.yaml | 12 +++++++---- deploy/csi-azurefile-node.yaml | 6 ++++-- deploy/rbac-csi-azurefile-controller.yaml | 1 + pkg/azurefileplugin/main.go | 2 +- 8 files changed, 25 insertions(+), 29 deletions(-) diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml index d8081f365..fcadd2d14 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml @@ -14,6 +14,7 @@ spec: {{ include "azurefile.labels" . | indent 6 }} app: csi-azurefile-controller spec: + hostNetwork: true # only required for MSI enabled cluster serviceAccountName: csi-azurefile-controller-sa nodeSelector: beta.kubernetes.io/os: linux @@ -107,7 +108,7 @@ spec: args: - --csi-address=/csi/csi.sock - --connection-timeout=3s - - --health-port=9702 + - --health-port=29612 - --v=5 volumeMounts: - name: socket-dir @@ -126,10 +127,10 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" ports: - - containerPort: 9702 + - containerPort: 29612 name: healthz protocol: TCP - - containerPort: 10252 + - containerPort: 29614 name: metrics protocol: TCP livenessProbe: @@ -171,17 +172,3 @@ spec: - name: msi hostPath: path: /var/lib/waagent/ManagedIdentity-Settings ---- -apiVersion: v1 -kind: Service -metadata: - name: csi-azurefile-controller - namespace: {{ .Release.Namespace }} -{{ include "azurefile.labels" . | indent 2 }} -spec: - selector: - app: csi-azurefile-controller - ports: - - port: 10252 - targetPort: 10252 - type: ClusterIP diff --git a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml index 21550aa8a..e685a6d6c 100644 --- a/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml +++ b/charts/latest/azurefile-csi-driver/templates/csi-azurefile-node.yaml @@ -27,7 +27,7 @@ spec: args: - --csi-address=/csi/csi.sock - --connection-timeout=3s - - --health-port=9702 + - --health-port=29613 - --v=5 resources: limits: @@ -70,7 +70,7 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" ports: - - containerPort: 9702 + - containerPort: 29613 name: healthz protocol: TCP livenessProbe: diff --git a/deploy/crd-csi-driver-registry.yaml b/deploy/crd-csi-driver-registry.yaml index 56beef731..dc7e96732 100644 --- a/deploy/crd-csi-driver-registry.yaml +++ b/deploy/crd-csi-driver-registry.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: @@ -18,13 +19,13 @@ spec: attachRequired: description: Indicates this CSI volume driver requires an attach operation, - and that Kubernetes should call attach and wait for any attach operation - to complete before proceeding to mount. + and that Kubernetes should call attach and wait for any attach + operation to complete before proceeding to mount. type: boolean podInfoOnMountVersion: description: Indicates this CSI volume driver requires additional pod - information (like podName, podUID, etc.) during mount operations. + information (like podName, podUID, etc.) during mount operations type: string version: v1alpha1 status: diff --git a/deploy/crd-csi-node-info.yaml b/deploy/crd-csi-node-info.yaml index 103f8d503..4ac7ff056 100644 --- a/deploy/crd-csi-node-info.yaml +++ b/deploy/crd-csi-node-info.yaml @@ -1,3 +1,4 @@ +--- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: diff --git a/deploy/csi-azurefile-controller.yaml b/deploy/csi-azurefile-controller.yaml index fbf7fc3ea..feaa489c1 100644 --- a/deploy/csi-azurefile-controller.yaml +++ b/deploy/csi-azurefile-controller.yaml @@ -14,6 +14,7 @@ spec: labels: app: csi-azurefile-controller spec: + hostNetwork: true # only required for MSI enabled cluster serviceAccountName: csi-azurefile-controller-sa nodeSelector: beta.kubernetes.io/os: linux @@ -55,8 +56,8 @@ spec: value: /csi/csi.sock imagePullPolicy: Always volumeMounts: - - mountPath: /csi - name: socket-dir + - mountPath: /csi + name: socket-dir resources: limits: cpu: 200m @@ -107,7 +108,7 @@ spec: args: - --csi-address=/csi/csi.sock - --connection-timeout=3s - - --health-port=9702 + - --health-port=29612 - --v=5 volumeMounts: - name: socket-dir @@ -126,9 +127,12 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" ports: - - containerPort: 9702 + - containerPort: 29612 name: healthz protocol: TCP + - containerPort: 29614 + name: metrics + protocol: TCP livenessProbe: failureThreshold: 5 httpGet: diff --git a/deploy/csi-azurefile-node.yaml b/deploy/csi-azurefile-node.yaml index f1fc963a7..7b57938de 100644 --- a/deploy/csi-azurefile-node.yaml +++ b/deploy/csi-azurefile-node.yaml @@ -1,3 +1,4 @@ +--- kind: DaemonSet apiVersion: apps/v1 metadata: @@ -26,7 +27,7 @@ spec: args: - --csi-address=/csi/csi.sock - --connection-timeout=3s - - --health-port=9702 + - --health-port=29613 - --v=5 resources: limits: @@ -69,7 +70,7 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" ports: - - containerPort: 9702 + - containerPort: 29613 name: healthz protocol: TCP livenessProbe: @@ -131,3 +132,4 @@ spec: - hostPath: path: /var/lib/waagent/ManagedIdentity-Settings name: msi +--- diff --git a/deploy/rbac-csi-azurefile-controller.yaml b/deploy/rbac-csi-azurefile-controller.yaml index 625a140e7..1ddf5e206 100644 --- a/deploy/rbac-csi-azurefile-controller.yaml +++ b/deploy/rbac-csi-azurefile-controller.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/pkg/azurefileplugin/main.go b/pkg/azurefileplugin/main.go index 4168ab3da..f531bb484 100644 --- a/pkg/azurefileplugin/main.go +++ b/pkg/azurefileplugin/main.go @@ -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:10252", "export the metrics") + metricsAddress = flag.String("metrics-address", "0.0.0.0:29614", "export the metrics") ) func main() {