doc: cut v1.2.0 release
This commit is contained in:
parent
657ab0cc66
commit
c29bb959d9
|
|
@ -11,9 +11,9 @@ This driver allows Kubernetes to use [SMB](https://wiki.wireshark.org/SMB) CSI v
|
||||||
|Driver Version | Image | supported k8s version | supported [Windows csi-proxy](https://github.com/kubernetes-csi/csi-proxy) version |
|
|Driver Version | Image | supported k8s version | supported [Windows csi-proxy](https://github.com/kubernetes-csi/csi-proxy) version |
|
||||||
|---------------|------------------------------------------|-----------------------|-------------------------------------|
|
|---------------|------------------------------------------|-----------------------|-------------------------------------|
|
||||||
|master branch |mcr.microsoft.com/k8s/csi/smb-csi:latest | 1.18+ | v0.2.2+ |
|
|master branch |mcr.microsoft.com/k8s/csi/smb-csi:latest | 1.18+ | v0.2.2+ |
|
||||||
|
|v1.2.0 |mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0 | 1.18+ | v0.2.2+ |
|
||||||
|v1.1.0 |mcr.microsoft.com/k8s/csi/smb-csi:v1.1.0 | 1.18+ | v0.2.2+ |
|
|v1.1.0 |mcr.microsoft.com/k8s/csi/smb-csi:v1.1.0 | 1.18+ | v0.2.2+ |
|
||||||
|v1.0.0 |mcr.microsoft.com/k8s/csi/smb-csi:v1.0.0 | 1.17+ | v0.2.2+ |
|
|v1.0.0 |mcr.microsoft.com/k8s/csi/smb-csi:v1.0.0 | 1.17+ | v0.2.2+ |
|
||||||
|v0.6.0 |mcr.microsoft.com/k8s/csi/smb-csi:v0.6.0 | 1.15+ | v0.2.0+ |
|
|
||||||
|
|
||||||
### Driver parameters
|
### Driver parameters
|
||||||
Please refer to [`smb.csi.k8s.io` driver parameters](./docs/driver-parameters.md)
|
Please refer to [`smb.csi.k8s.io` driver parameters](./docs/driver-parameters.md)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-syste
|
||||||
### install a specific version
|
### install a specific version
|
||||||
```console
|
```console
|
||||||
helm repo add csi-driver-smb https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts
|
helm repo add csi-driver-smb https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts
|
||||||
helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-system --version v1.1.0
|
helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-system --version v1.2.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### install driver with customized driver name, deployment name
|
### install driver with customized driver name, deployment name
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,25 @@ entries:
|
||||||
csi-driver-smb:
|
csi-driver-smb:
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: latest
|
appVersion: latest
|
||||||
created: "2021-06-27T07:48:26.03851267Z"
|
created: 2021-07-18T13:13:46.242481149Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: 8ec8ff2150f1863e2517dc89368a409cb846c94316dabcc467986d8a882c6e15
|
digest: c1be05d7b1bce1bf1f30dafd33c9e8dd2b4ea276669247ad920e3812b8301ed4
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
urls:
|
urls:
|
||||||
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-v1.2.0.tgz
|
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-v1.2.0.tgz
|
||||||
version: v1.2.0
|
version: v1.2.0
|
||||||
|
- apiVersion: v1
|
||||||
|
appVersion: v1.2.0
|
||||||
|
created: 2021-07-18T13:13:46.247378888Z
|
||||||
|
description: SMB CSI Driver for Kubernetes
|
||||||
|
digest: f475924011bf4b3d920cee85e07f1236731fc8256634c12f49b8eae1711c99ab
|
||||||
|
name: csi-driver-smb
|
||||||
|
urls:
|
||||||
|
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.2.0/csi-driver-smb-v1.2.0.tgz
|
||||||
|
version: v1.2.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v1.1.0
|
appVersion: v1.1.0
|
||||||
created: "2021-06-27T07:48:26.042576803Z"
|
created: 2021-07-18T13:13:46.247092985Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: 19bdba4a6b473bf3d7494cea64146fc1874c8440e3adf5262d822659cd276837
|
digest: 19bdba4a6b473bf3d7494cea64146fc1874c8440e3adf5262d822659cd276837
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -21,7 +30,7 @@ entries:
|
||||||
version: v1.1.0
|
version: v1.1.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
created: "2021-06-27T07:48:26.041767997Z"
|
created: 2021-07-18T13:13:46.246236979Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: 2360e6e088403818944cc057ad3bf0f99ae295a421d4637f1d3c7cbe3c4ab27f
|
digest: 2360e6e088403818944cc057ad3bf0f99ae295a421d4637f1d3c7cbe3c4ab27f
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -30,7 +39,7 @@ entries:
|
||||||
version: v1.0.0
|
version: v1.0.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v0.6.0
|
appVersion: v0.6.0
|
||||||
created: "2021-06-27T07:48:26.041251592Z"
|
created: 2021-07-18T13:13:46.245544173Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: 5ad0b7b9f84fa313387a9bbfb0ed59cff70b10633cedf81e7b77af936ff2806e
|
digest: 5ad0b7b9f84fa313387a9bbfb0ed59cff70b10633cedf81e7b77af936ff2806e
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -39,7 +48,7 @@ entries:
|
||||||
version: v0.6.0
|
version: v0.6.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v0.5.0
|
appVersion: v0.5.0
|
||||||
created: "2021-06-27T07:48:26.040788689Z"
|
created: 2021-07-18T13:13:46.24511937Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: b400ef563745dcaf4a819a05b1e8a11d9442ae1ddf46da70542d5c87cd4cd9a1
|
digest: b400ef563745dcaf4a819a05b1e8a11d9442ae1ddf46da70542d5c87cd4cd9a1
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -48,7 +57,7 @@ entries:
|
||||||
version: v0.5.0
|
version: v0.5.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v0.4.0
|
appVersion: v0.4.0
|
||||||
created: "2021-06-27T07:48:26.040196084Z"
|
created: 2021-07-18T13:13:46.244122062Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: fb6d581ba5d4d1d78ca468f6daa4a24c47bb147b74d005d3c394521b4e534a3e
|
digest: fb6d581ba5d4d1d78ca468f6daa4a24c47bb147b74d005d3c394521b4e534a3e
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -57,7 +66,7 @@ entries:
|
||||||
version: v0.4.0
|
version: v0.4.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v0.3.0
|
appVersion: v0.3.0
|
||||||
created: "2021-06-27T07:48:26.039632079Z"
|
created: 2021-07-18T13:13:46.243784659Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: ee9e58db6d4a95491e2012c6607126bbff827b9c439e90e9a9798d2a73b0cb22
|
digest: ee9e58db6d4a95491e2012c6607126bbff827b9c439e90e9a9798d2a73b0cb22
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
|
|
@ -66,11 +75,11 @@ entries:
|
||||||
version: v0.3.0
|
version: v0.3.0
|
||||||
- apiVersion: v1
|
- apiVersion: v1
|
||||||
appVersion: v0.2.0
|
appVersion: v0.2.0
|
||||||
created: "2021-06-27T07:48:26.039175975Z"
|
created: 2021-07-18T13:13:46.243148054Z
|
||||||
description: SMB CSI Driver for Kubernetes
|
description: SMB CSI Driver for Kubernetes
|
||||||
digest: 8d8667106306d78dea9f63e5a3e8ee7ad2b60f86bd625f5968e37ca6a0cad317
|
digest: 8d8667106306d78dea9f63e5a3e8ee7ad2b60f86bd625f5968e37ca6a0cad317
|
||||||
name: csi-driver-smb
|
name: csi-driver-smb
|
||||||
urls:
|
urls:
|
||||||
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v0.2.0/csi-driver-smb-v0.2.0.tgz
|
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v0.2.0/csi-driver-smb-v0.2.0.tgz
|
||||||
version: v0.2.0
|
version: v0.2.0
|
||||||
generated: "2021-06-27T07:48:26.037692763Z"
|
generated: 2021-07-18T13:13:46.242104646Z
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: v1
|
||||||
|
appVersion: v1.2.0
|
||||||
|
description: SMB CSI Driver for Kubernetes
|
||||||
|
name: csi-driver-smb
|
||||||
|
version: v1.2.0
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
The CSI SMB Driver is getting deployed to your cluster.
|
||||||
|
|
||||||
|
To check CSI SMB Driver pods status, please run:
|
||||||
|
|
||||||
|
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
|
||||||
|
{{/* Expand the name of the chart.*/}}
|
||||||
|
{{- define "smb.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/* labels for helm resources */}}
|
||||||
|
{{- define "smb.labels" -}}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: "{{ .Release.Name }}"
|
||||||
|
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
|
||||||
|
app.kubernetes.io/name: "{{ template "smb.name" . }}"
|
||||||
|
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
|
||||||
|
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/* pull secrets for containers */}}
|
||||||
|
{{- define "smb.pullSecrets" -}}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- range .Values.imagePullSecrets }}
|
||||||
|
- name: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.controller.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.controller.replicas }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Values.controller.name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{ include "smb.labels" . | indent 6 }}
|
||||||
|
app: {{ .Values.controller.name }}
|
||||||
|
{{- if .Values.podLabels }}
|
||||||
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.controller.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- with .Values.controller.nodeSelector }}
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
{{- if .Values.controller.runOnMaster}}
|
||||||
|
kubernetes.io/role: master
|
||||||
|
{{- end}}
|
||||||
|
priorityClassName: system-cluster-critical
|
||||||
|
{{- with .Values.controller.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "smb.pullSecrets" . | indent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: csi-provisioner
|
||||||
|
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
|
||||||
|
args:
|
||||||
|
- "-v=2"
|
||||||
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
- "--leader-election"
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
|
||||||
|
- name: liveness-probe
|
||||||
|
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
|
||||||
|
args:
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
|
||||||
|
- --v=2
|
||||||
|
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
|
||||||
|
- name: smb
|
||||||
|
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "--v={{ .Values.controller.logLevel }}"
|
||||||
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
- "--metrics-address=0.0.0.0:{{ .Values.controller.metricsPort }}"
|
||||||
|
- "--drivername={{ .Values.driver.name }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: {{ .Values.controller.metricsPort }}
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix:///csi/csi.sock
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
resources: {{- toYaml .Values.controller.resources.smb | nindent 12 }}
|
||||||
|
volumes:
|
||||||
|
- name: socket-dir
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if .Values.securityContext }}
|
||||||
|
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: CSIDriver
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.driver.name }}
|
||||||
|
spec:
|
||||||
|
attachRequired: false
|
||||||
|
podInfoOnMount: true
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
{{- if .Values.windows.enabled}}
|
||||||
|
kind: DaemonSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.windows.dsName }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Values.windows.dsName }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{ include "smb.labels" . | indent 6 }}
|
||||||
|
app: {{ .Values.windows.dsName }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.windows.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: windows
|
||||||
|
priorityClassName: system-node-critical
|
||||||
|
{{- include "smb.pullSecrets" . | indent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: liveness-probe
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: C:\csi
|
||||||
|
name: plugin-dir
|
||||||
|
image: "{{ .Values.windows.image.livenessProbe.repository }}:{{ .Values.windows.image.livenessProbe.tag }}"
|
||||||
|
args:
|
||||||
|
- --csi-address=$(CSI_ENDPOINT)
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port={{ .Values.node.livenessProbe.healthPort }}
|
||||||
|
- --v=2
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
imagePullPolicy: {{ .Values.windows.image.livenessProbe.pullPolicy }}
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: node-driver-registrar
|
||||||
|
image: "{{ .Values.windows.image.nodeDriverRegistrar.repository }}:{{ .Values.windows.image.nodeDriverRegistrar.tag }}"
|
||||||
|
args:
|
||||||
|
- --v=2
|
||||||
|
- --csi-address=$(CSI_ENDPOINT)
|
||||||
|
- --kubelet-registration-path={{ .Values.windows.kubelet }}\\plugins\\{{ .Values.driver.name }}\\csi.sock
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
imagePullPolicy: {{ .Values.windows.image.nodeDriverRegistrar.pullPolicy }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: plugin-dir
|
||||||
|
mountPath: C:\csi
|
||||||
|
- name: registration-dir
|
||||||
|
mountPath: C:\registration
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: smb
|
||||||
|
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "--v={{ .Values.node.logLevel }}"
|
||||||
|
- "--drivername={{ .Values.driver.name }}"
|
||||||
|
- --endpoint=$(CSI_ENDPOINT)
|
||||||
|
- --nodeid=$(KUBE_NODE_NAME)
|
||||||
|
- "--metrics-address=0.0.0.0:{{ .Values.node.metricsPort }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
volumeMounts:
|
||||||
|
- name: kubelet-dir
|
||||||
|
mountPath: {{ .Values.windows.kubelet }}\
|
||||||
|
- name: plugin-dir
|
||||||
|
mountPath: C:\csi
|
||||||
|
- name: csi-proxy-fs-pipe
|
||||||
|
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
|
||||||
|
- name: csi-proxy-smb-pipe
|
||||||
|
mountPath: \\.\pipe\csi-proxy-smb-v1beta1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 400m
|
||||||
|
memory: 400Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
volumes:
|
||||||
|
- name: csi-proxy-fs-pipe
|
||||||
|
hostPath:
|
||||||
|
path: \\.\pipe\csi-proxy-filesystem-v1beta1
|
||||||
|
type: ""
|
||||||
|
- name: csi-proxy-smb-pipe
|
||||||
|
hostPath:
|
||||||
|
path: \\.\pipe\csi-proxy-smb-v1beta1
|
||||||
|
type: ""
|
||||||
|
- name: registration-dir
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.windows.kubelet }}\plugins_registry\
|
||||||
|
type: Directory
|
||||||
|
- name: kubelet-dir
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.windows.kubelet }}\
|
||||||
|
type: Directory
|
||||||
|
- name: plugin-dir
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.windows.kubelet }}\plugins\{{ .Values.driver.name }}\
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
{{- if .Values.linux.enabled}}
|
||||||
|
kind: DaemonSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.linux.dsName }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Values.linux.dsName }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{ include "smb.labels" . | indent 6 }}
|
||||||
|
app: {{ .Values.linux.dsName }}
|
||||||
|
{{- if .Values.podLabels }}
|
||||||
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
{{- with .Values.node.nodeSelector }}
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.node.affinity }}
|
||||||
|
{{- toYaml .Values.node.affinity | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||||
|
{{- with .Values.linux.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "smb.pullSecrets" . | indent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: liveness-probe
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
|
||||||
|
args:
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port={{ .Values.node.livenessProbe.healthPort }}
|
||||||
|
- --v=2
|
||||||
|
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
|
||||||
|
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
|
||||||
|
- name: node-driver-registrar
|
||||||
|
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
|
||||||
|
args:
|
||||||
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||||
|
- --v=2
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command: ["/bin/sh", "-c", "rm -rf /registration/{{ .Values.driver.name }}-reg.sock /csi/csi.sock"]
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
- name: DRIVER_REG_SOCK_PATH
|
||||||
|
value: {{ .Values.linux.kubelet }}/plugins/{{ .Values.driver.name }}/csi.sock
|
||||||
|
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
- name: registration-dir
|
||||||
|
mountPath: /registration
|
||||||
|
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
|
||||||
|
- name: smb
|
||||||
|
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
|
||||||
|
args:
|
||||||
|
- "--v={{ .Values.node.logLevel }}"
|
||||||
|
- "--drivername={{ .Values.driver.name }}"
|
||||||
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||||
|
- "--metrics-address=0.0.0.0:{{ .Values.node.metricsPort }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix:///csi/csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- mountPath: {{ .Values.linux.kubelet }}/
|
||||||
|
mountPropagation: Bidirectional
|
||||||
|
name: mountpoint-dir
|
||||||
|
resources: {{- toYaml .Values.node.resources.smb | nindent 12 }}
|
||||||
|
volumes:
|
||||||
|
- hostPath:
|
||||||
|
path: {{ .Values.linux.kubelet }}/plugins/{{ .Values.driver.name }}
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: socket-dir
|
||||||
|
- hostPath:
|
||||||
|
path: {{ .Values.linux.kubelet }}/
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: mountpoint-dir
|
||||||
|
- hostPath:
|
||||||
|
path: {{ .Values.linux.kubelet }}/plugins_registry/
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: registration-dir
|
||||||
|
{{- if .Values.securityContext }}
|
||||||
|
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.serviceAccount.controller }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
---
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.create -}}
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.rbac.name }}-external-provisioner-role
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumes"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["storageclasses"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["events"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["csinodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["coordination.k8s.io"]
|
||||||
|
resources: ["leases"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["get"]
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.rbac.name }}-csi-provisioner-binding
|
||||||
|
{{ include "smb.labels" . | indent 2 }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ .Values.serviceAccount.controller }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ .Values.rbac.name }}-external-provisioner-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
image:
|
||||||
|
smb:
|
||||||
|
repository: mcr.microsoft.com/k8s/csi/smb-csi
|
||||||
|
tag: v1.2.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
csiProvisioner:
|
||||||
|
repository: k8s.gcr.io/sig-storage/csi-provisioner
|
||||||
|
tag: v2.1.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
livenessProbe:
|
||||||
|
repository: k8s.gcr.io/sig-storage/livenessprobe
|
||||||
|
tag: v2.3.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
nodeDriverRegistrar:
|
||||||
|
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
|
||||||
|
tag: v2.2.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true # When true, service accounts will be created for you. Set to false if you want to use your own.
|
||||||
|
controller: csi-smb-controller-sa # Name of Service Account to be created or used
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
create: true
|
||||||
|
name: smb
|
||||||
|
|
||||||
|
driver:
|
||||||
|
name: smb.csi.k8s.io
|
||||||
|
|
||||||
|
controller:
|
||||||
|
name: csi-smb-controller
|
||||||
|
replicas: 2
|
||||||
|
metricsPort: 29644
|
||||||
|
livenessProbe:
|
||||||
|
healthPort: 29642
|
||||||
|
runOnMaster: false
|
||||||
|
logLevel: 5
|
||||||
|
resources:
|
||||||
|
csiProvisioner:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 300Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
livenessProbe:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
smb:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
affinity: {}
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations:
|
||||||
|
- key: "node-role.kubernetes.io/master"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
- key: "node-role.kubernetes.io/controlplane"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
|
||||||
|
node:
|
||||||
|
metricsPort: 29645
|
||||||
|
logLevel: 5
|
||||||
|
livenessProbe:
|
||||||
|
healthPort: 29643
|
||||||
|
resources:
|
||||||
|
livenessProbe:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
nodeDriverRegistrar:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
smb:
|
||||||
|
limits:
|
||||||
|
cpu: 400m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
affinity: {}
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
linux:
|
||||||
|
enabled: true
|
||||||
|
dsName: csi-smb-node # daemonset name
|
||||||
|
kubelet: /var/lib/kubelet
|
||||||
|
tolerations:
|
||||||
|
- operator: "Exists"
|
||||||
|
|
||||||
|
windows:
|
||||||
|
enabled: false
|
||||||
|
dsName: csi-smb-node-win # daemonset name
|
||||||
|
kubelet: 'C:\var\lib\kubelet'
|
||||||
|
image:
|
||||||
|
livenessProbe:
|
||||||
|
repository: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe
|
||||||
|
tag: v2.3.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
nodeDriverRegistrar:
|
||||||
|
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar
|
||||||
|
tag: v2.2.0
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tolerations:
|
||||||
|
- key: "node.kubernetes.io/os"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
|
||||||
|
## Collection of annotations to add to all the pods
|
||||||
|
podAnnotations: {}
|
||||||
|
## Collection of labels to add to all the pods
|
||||||
|
podLabels: {}
|
||||||
|
## Leverage a PriorityClass to ensure your pods survive resource shortages
|
||||||
|
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||||
|
priorityClassName: system-cluster-critical
|
||||||
|
## Security context give the opportunity to run container as nonroot by setting a securityContext
|
||||||
|
## by example :
|
||||||
|
## securityContext: { runAsUser: 1001 }
|
||||||
|
securityContext: {}
|
||||||
|
|
@ -64,7 +64,7 @@ spec:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 20Mi
|
memory: 20Mi
|
||||||
- name: smb
|
- name: smb
|
||||||
image: mcr.microsoft.com/k8s/csi/smb-csi:latest
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ spec:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 20Mi
|
memory: 20Mi
|
||||||
- name: smb
|
- name: smb
|
||||||
image: mcr.microsoft.com/k8s/csi/smb-csi:latest
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- --v=5
|
- --v=5
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ spec:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 20Mi
|
memory: 20Mi
|
||||||
- name: smb
|
- name: smb
|
||||||
image: mcr.microsoft.com/k8s/csi/smb-csi:latest
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: csi-smb-controller
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: csi-smb-controller
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: csi-smb-controller
|
||||||
|
spec:
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
serviceAccountName: csi-smb-controller-sa
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
priorityClassName: system-cluster-critical
|
||||||
|
tolerations:
|
||||||
|
- key: "node-role.kubernetes.io/master"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
- key: "node-role.kubernetes.io/controlplane"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
containers:
|
||||||
|
- name: csi-provisioner
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.0
|
||||||
|
args:
|
||||||
|
- "-v=2"
|
||||||
|
- "--csi-address=$(ADDRESS)"
|
||||||
|
- "--leader-election"
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 300Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: liveness-probe
|
||||||
|
image: k8s.gcr.io/sig-storage/livenessprobe:v2.3.0
|
||||||
|
args:
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port=29642
|
||||||
|
- --v=2
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: smb
|
||||||
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- "--v=5"
|
||||||
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
- "--metrics-address=0.0.0.0:29644"
|
||||||
|
ports:
|
||||||
|
- containerPort: 29642
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 29644
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix:///csi/csi.sock
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
volumes:
|
||||||
|
- name: socket-dir
|
||||||
|
emptyDir: {}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: CSIDriver
|
||||||
|
metadata:
|
||||||
|
name: smb.csi.k8s.io
|
||||||
|
spec:
|
||||||
|
attachRequired: false
|
||||||
|
podInfoOnMount: true
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
---
|
||||||
|
kind: DaemonSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: csi-smb-node-win
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: csi-smb-node-win
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: csi-smb-node-win
|
||||||
|
spec:
|
||||||
|
tolerations:
|
||||||
|
- key: "node.kubernetes.io/os"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: windows
|
||||||
|
priorityClassName: system-node-critical
|
||||||
|
containers:
|
||||||
|
- name: liveness-probe
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: C:\csi
|
||||||
|
name: plugin-dir
|
||||||
|
image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v2.3.0
|
||||||
|
args:
|
||||||
|
- --csi-address=$(CSI_ENDPOINT)
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port=29643
|
||||||
|
- --v=2
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: node-driver-registrar
|
||||||
|
image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.2.0
|
||||||
|
args:
|
||||||
|
- --v=2
|
||||||
|
- --csi-address=$(CSI_ENDPOINT)
|
||||||
|
- --kubelet-registration-path=C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\csi.sock
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
volumeMounts:
|
||||||
|
- name: kubelet-dir
|
||||||
|
mountPath: "C:\\var\\lib\\kubelet"
|
||||||
|
- name: plugin-dir
|
||||||
|
mountPath: C:\csi
|
||||||
|
- name: registration-dir
|
||||||
|
mountPath: C:\registration
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: smb
|
||||||
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- --v=5
|
||||||
|
- --endpoint=$(CSI_ENDPOINT)
|
||||||
|
- --nodeid=$(KUBE_NODE_NAME)
|
||||||
|
- "--metrics-address=0.0.0.0:29645"
|
||||||
|
ports:
|
||||||
|
- containerPort: 29643
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix://C:\\csi\\csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
volumeMounts:
|
||||||
|
- name: kubelet-dir
|
||||||
|
mountPath: "C:\\var\\lib\\kubelet"
|
||||||
|
- name: plugin-dir
|
||||||
|
mountPath: C:\csi
|
||||||
|
- name: csi-proxy-fs-pipe
|
||||||
|
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
|
||||||
|
- name: csi-proxy-smb-pipe
|
||||||
|
mountPath: \\.\pipe\csi-proxy-smb-v1beta1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 400m
|
||||||
|
memory: 400Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
volumes:
|
||||||
|
- name: csi-proxy-fs-pipe
|
||||||
|
hostPath:
|
||||||
|
path: \\.\pipe\csi-proxy-filesystem-v1beta1
|
||||||
|
type: ""
|
||||||
|
- name: csi-proxy-smb-pipe
|
||||||
|
hostPath:
|
||||||
|
path: \\.\pipe\csi-proxy-smb-v1beta1
|
||||||
|
type: ""
|
||||||
|
- name: registration-dir
|
||||||
|
hostPath:
|
||||||
|
path: C:\var\lib\kubelet\plugins_registry\
|
||||||
|
type: Directory
|
||||||
|
- name: kubelet-dir
|
||||||
|
hostPath:
|
||||||
|
path: C:\var\lib\kubelet\
|
||||||
|
type: Directory
|
||||||
|
- name: plugin-dir
|
||||||
|
hostPath:
|
||||||
|
path: C:\var\lib\kubelet\plugins\smb.csi.k8s.io\
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
---
|
||||||
|
kind: DaemonSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: csi-smb-node
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: csi-smb-node
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: csi-smb-node
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
priorityClassName: system-node-critical
|
||||||
|
tolerations:
|
||||||
|
- operator: "Exists"
|
||||||
|
containers:
|
||||||
|
- name: liveness-probe
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
image: k8s.gcr.io/sig-storage/livenessprobe:v2.3.0
|
||||||
|
args:
|
||||||
|
- --csi-address=/csi/csi.sock
|
||||||
|
- --probe-timeout=3s
|
||||||
|
- --health-port=29643
|
||||||
|
- --v=2
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: node-driver-registrar
|
||||||
|
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0
|
||||||
|
args:
|
||||||
|
- --csi-address=$(ADDRESS)
|
||||||
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||||
|
- --v=2
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command: ["/bin/sh", "-c", "rm -rf /registration/smb.csi.k8s.io-reg.sock /csi/csi.sock"]
|
||||||
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: /csi/csi.sock
|
||||||
|
- name: DRIVER_REG_SOCK_PATH
|
||||||
|
value: /var/lib/kubelet/plugins/smb.csi.k8s.io/csi.sock
|
||||||
|
volumeMounts:
|
||||||
|
- name: socket-dir
|
||||||
|
mountPath: /csi
|
||||||
|
- name: registration-dir
|
||||||
|
mountPath: /registration
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- name: smb
|
||||||
|
image: mcr.microsoft.com/k8s/csi/smb-csi:v1.2.0
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- "--v=5"
|
||||||
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||||
|
- "--metrics-address=0.0.0.0:29645"
|
||||||
|
ports:
|
||||||
|
- containerPort: 29643
|
||||||
|
name: healthz
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: healthz
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
env:
|
||||||
|
- name: CSI_ENDPOINT
|
||||||
|
value: unix:///csi/csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /csi
|
||||||
|
name: socket-dir
|
||||||
|
- mountPath: /var/lib/kubelet/
|
||||||
|
mountPropagation: Bidirectional
|
||||||
|
name: mountpoint-dir
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 400m
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
volumes:
|
||||||
|
- hostPath:
|
||||||
|
path: /var/lib/kubelet/plugins/smb.csi.k8s.io
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: socket-dir
|
||||||
|
- hostPath:
|
||||||
|
path: /var/lib/kubelet/
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: mountpoint-dir
|
||||||
|
- hostPath:
|
||||||
|
path: /var/lib/kubelet/plugins_registry/
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
name: registration-dir
|
||||||
|
---
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: csi-smb-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: smb-external-provisioner-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumes"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["storageclasses"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["events"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["csinodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["coordination.k8s.io"]
|
||||||
|
resources: ["leases"]
|
||||||
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["secrets"]
|
||||||
|
verbs: ["get"]
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: smb-csi-provisioner-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: csi-smb-controller-sa
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: smb-external-provisioner-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
## Install SMB CSI driver v1.2.0 version on a Kubernetes cluster
|
||||||
|
|
||||||
|
### Install by kubectl
|
||||||
|
```console
|
||||||
|
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v1.2.0/deploy/install-driver.sh | bash -s v1.2.0 --
|
||||||
|
```
|
||||||
|
|
||||||
|
- check pods status:
|
||||||
|
```console
|
||||||
|
kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-controller
|
||||||
|
kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-node
|
||||||
|
```
|
||||||
|
|
||||||
|
example output:
|
||||||
|
|
||||||
|
```
|
||||||
|
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
|
||||||
|
csi-smb-controller-788486959d-5qmn7 3/3 Running 0 23s 10.244.0.45 aks-agentpool-60632172-vmss000006 <none> <none>
|
||||||
|
csi-smb-controller-788486959d-g4hpm 3/3 Running 0 32s 10.244.1.33 aks-agentpool-60632172-vmss000007 <none> <none>
|
||||||
|
csi-smb-node-4gwzl 3/3 Running 0 15s 10.244.1.34 aks-agentpool-60632172-vmss000007 <none> <none>
|
||||||
|
csi-smb-node-hg76w 3/3 Running 0 27s 10.244.0.44 aks-agentpool-60632172-vmss000006 <none> <none>
|
||||||
|
```
|
||||||
|
|
||||||
|
### clean up SMB CSI driver
|
||||||
|
```console
|
||||||
|
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v1.2.0/deploy/uninstall-driver.sh | bash -s --
|
||||||
|
```
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
## Install smb CSI driver on a Kubernetes cluster
|
## Install smb CSI driver on a Kubernetes cluster
|
||||||
|
|
||||||
- [install CSI driver master version](./install-csi-driver-master.md)
|
- [install CSI driver master version](./install-csi-driver-master.md)
|
||||||
|
- [install CSI driver v1.2.0 version](./install-csi-driver-v1.2.0.md)
|
||||||
- [install CSI driver v1.1.0 version](./install-csi-driver-v1.1.0.md)
|
- [install CSI driver v1.1.0 version](./install-csi-driver-v1.1.0.md)
|
||||||
- [install CSI driver v1.0.0 version](./install-csi-driver-v1.0.0.md)
|
- [install CSI driver v1.0.0 version](./install-csi-driver-v1.0.0.md)
|
||||||
- [install CSI driver v0.6.0 version](./install-csi-driver-v0.6.0.md)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue