From ec4a32a28967f956a1c9ffefd11e637dc377a3e2 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 9 Jan 2020 13:23:00 -0800 Subject: [PATCH] remove deprecated connection-timeout arg --- README.md | 4 - cmd/livenessprobe/main.go | 3 - .../hostpath-with-livenessprobe.yaml | 201 ------------------ .../kubernetes/livenessprobe-sidecar.yaml | 5 +- 4 files changed, 2 insertions(+), 211 deletions(-) delete mode 100644 deployment/kubernetes/hostpath-with-livenessprobe.yaml diff --git a/README.md b/README.md index d6ee3b04..4cdb3c13 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,6 @@ spec: * All glog / klog arguments are supported, such as `-v ` or `-alsologtostderr`. -#### Deprecated arguments - -* `--connection-timeout `: This option was used to limit establishing connection to CSI driver. Currently, the option does not have any effect and the external-provisioner tries to connect to CSI driver socket indefinitely. It is recommended to run ReadinessProbe on the driver to ensure that the driver comes up in reasonable time. - ## Community, discussion, contribution, and support Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). diff --git a/cmd/livenessprobe/main.go b/cmd/livenessprobe/main.go index 51dd2972..e0e310b5 100644 --- a/cmd/livenessprobe/main.go +++ b/cmd/livenessprobe/main.go @@ -26,7 +26,6 @@ import ( "k8s.io/klog" connlib "github.com/kubernetes-csi/csi-lib-utils/connection" - "github.com/kubernetes-csi/csi-lib-utils/deprecatedflags" "github.com/kubernetes-csi/csi-lib-utils/rpc" "google.golang.org/grpc" @@ -37,8 +36,6 @@ var ( probeTimeout = flag.Duration("probe-timeout", time.Second, "Probe timeout in seconds") csiAddress = flag.String("csi-address", "/run/csi/socket", "Address of the CSI driver socket.") healthzPort = flag.String("health-port", "9808", "TCP ports for listening healthz requests") - - _ = deprecatedflags.Add("connection-timeout") ) type healthProbe struct { diff --git a/deployment/kubernetes/hostpath-with-livenessprobe.yaml b/deployment/kubernetes/hostpath-with-livenessprobe.yaml deleted file mode 100644 index 043ae4a3..00000000 --- a/deployment/kubernetes/hostpath-with-livenessprobe.yaml +++ /dev/null @@ -1,201 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: csi-hostpath-sc -provisioner: csi-hostpath -parameters: - csiProvisionerSecretName: csi-secret - csiProvisionerSecretNamespace: default -reclaimPolicy: Delete -volumeBindingMode: Immediate ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: csi-service-account - namespace: default ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: csi-cluster-role -rules: -- apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - create - - delete - - get - - list - - watch - - update -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list -- apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - get - - list - - watch - - update -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - list - - watch - - update -- apiGroups: - - storage.k8s.io - resources: - - volumeattachments - verbs: - - get - - list - - watch - - update -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - list - - watch - - create - - update - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: csi-role-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: csi-cluster-role -subjects: -- kind: ServiceAccount - name: csi-service-account - namespace: default ---- -apiVersion: v1 -kind: Pod -metadata: - labels: - app: hostpath-driver - name: csi-hostpath-plugin - namespace: default -spec: - serviceAccount: csi-service-account - containers: - - name: external-provisioner - args: - - --v=5 - - --provisioner=csi-hostpath - - --csi-address=/csi/csi.sock - image: quay.io/k8scsi/csi-provisioner:v0.2.0 - imagePullPolicy: Always - volumeMounts: - - mountPath: /csi - name: socket-dir - - name: driver-registrar - args: - - --v=5 - - --csi-address=/csi/csi.sock - env: - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - image: quay.io/k8scsi/driver-registrar:v0.2.0 - imagePullPolicy: Always - volumeMounts: - - mountPath: /csi - name: socket-dir - - name: external-attacher - args: - - --v=5 - - --csi-address=$(ADDRESS) - env: - - name: ADDRESS - value: /csi/csi.sock - image: quay.io/k8scsi/csi-attacher:v0.2.0 - imagePullPolicy: Always - volumeMounts: - - mountPath: /csi - name: socket-dir - - name: hostpath-driver - image: quay.io/k8scsi/hostpathplugin:v0.2.0 - imagePullPolicy: Always - securityContext: - privileged: true - ports: - - containerPort: 9808 - name: healthz - protocol: TCP - livenessProbe: - failureThreshold: 5 - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 10 - timeoutSeconds: 3 - periodSeconds: 2 - failureThreshold: 1 - volumeMounts: - - mountPath: /csi - name: socket-dir - - mountPath: /var/lib/kubelet/pods - mountPropagation: Bidirectional - name: mountpoint-dir - args: - - --v=5 - - --endpoint=$(CSI_ENDPOINT) - - --nodeid=$(KUBE_NODE_NAME) - env: - - name: CSI_ENDPOINT - value: unix:///csi/csi.sock - - name: KUBE_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: liveness-probe - imagePullPolicy: Always - volumeMounts: - - mountPath: /csi - name: socket-dir - image: quay.io/k8scsi/livenessprobe:v0.2.0 - args: - - --v=5 - - --csi-address=/csi/csi.sock - - --connection-timeout=3s - volumes: - - hostPath: - path: /var/lib/kubelet/plugins/csi-hostpath - type: DirectoryOrCreate - name: socket-dir - - hostPath: - path: /var/lib/kubelet/pods - type: DirectoryOrCreate - name: mountpoint-dir diff --git a/deployment/kubernetes/livenessprobe-sidecar.yaml b/deployment/kubernetes/livenessprobe-sidecar.yaml index 0fc93ce7..2fdc6a6d 100644 --- a/deployment/kubernetes/livenessprobe-sidecar.yaml +++ b/deployment/kubernetes/livenessprobe-sidecar.yaml @@ -1,5 +1,5 @@ - name: hostpath-driver - image: quay.io/k8scsi/hostpathplugin:v0.2.0 + image: quay.io/k8scsi/hostpathplugin:canary imagePullPolicy: Always securityContext: privileged: true @@ -47,9 +47,8 @@ volumeMounts: - mountPath: /csi name: socket-dir - image: quay.io/k8scsi/livenessprobe:v0.2.0 + image: quay.io/k8scsi/livenessprobe:canary args: - --v=5 - --csi-address=/csi/csi.sock - - --connection-timeout=3s #