doc: cut v1.18.0 release

This commit is contained in:
andyzhangx 2025-05-12 03:18:53 +00:00
parent 7b23ca333f
commit 6286cadc2c
31 changed files with 1817 additions and 48 deletions

View File

@ -13,9 +13,9 @@ This driver allows Kubernetes to access [SMB](https://wiki.wireshark.org/SMB) se
|Driver Version | supported k8s version | supported [Windows csi-proxy](https://github.com/kubernetes-csi/csi-proxy) version | |Driver Version | supported k8s version | supported [Windows csi-proxy](https://github.com/kubernetes-csi/csi-proxy) version |
|---------------|-----------------------|-------------------------------------| |---------------|-----------------------|-------------------------------------|
|master branch | 1.21+ | v0.2.2+ | |master branch | 1.21+ | v0.2.2+ |
|v1.18.0 | 1.21+ | v0.2.2+ |
|v1.17.0 | 1.21+ | v0.2.2+ | |v1.17.0 | 1.21+ | v0.2.2+ |
|v1.16.0 | 1.21+ | v0.2.2+ | |v1.16.0 | 1.21+ | v0.2.2+ |
|v1.15.0 | 1.21+ | v0.2.2+ |
### 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)

View File

@ -14,7 +14,7 @@
```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.17.0 helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-system --version v1.18.0
``` ```
### install driver with customized driver name, deployment name ### install driver with customized driver name, deployment name

View File

@ -2,17 +2,35 @@ apiVersion: v1
entries: entries:
csi-driver-smb: csi-driver-smb:
- apiVersion: v1 - apiVersion: v1
appVersion: v1.17.0 appVersion: 1.18.0
created: "2025-01-23T14:00:07.502924191Z" created: "2025-05-12T03:18:14.642245535Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 3ee4c0ac96f6b039ea8386d22420effe5a8f1477b1b22805f7d0e31f073a5ec4 digest: 0e1be374c05208df165aee068b74b7e3da6af1664aa62e19b27953d659f39bca
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-1.18.0.tgz
version: 1.18.0
- apiVersion: v1
appVersion: 1.18.0
created: "2025-05-12T03:18:14.651945976Z"
description: SMB CSI Driver for Kubernetes
digest: 0e1be374c05208df165aee068b74b7e3da6af1664aa62e19b27953d659f39bca
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.18.0/csi-driver-smb-1.18.0.tgz
version: 1.18.0
- apiVersion: v1
appVersion: v1.17.0
created: "2025-05-12T03:18:14.651154372Z"
description: SMB CSI Driver for Kubernetes
digest: 9ff1f5c12e399180b51d723280282e786051a707208d7843aedf656a7669b988
name: csi-driver-smb name: csi-driver-smb
urls: urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.17.0/csi-driver-smb-v1.17.0.tgz - https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.17.0/csi-driver-smb-v1.17.0.tgz
version: v1.17.0 version: v1.17.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.16.0 appVersion: v1.16.0
created: "2025-01-23T14:00:07.502254631Z" created: "2025-05-12T03:18:14.649382804Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 2c65fecc535e072ea322752ef6d3500bb494bc746b63f5b1ed98cd64f82a1d9e digest: 2c65fecc535e072ea322752ef6d3500bb494bc746b63f5b1ed98cd64f82a1d9e
name: csi-driver-smb name: csi-driver-smb
@ -21,7 +39,7 @@ entries:
version: v1.16.0 version: v1.16.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.15.0 appVersion: v1.15.0
created: "2025-01-23T14:00:07.501628674Z" created: "2025-05-12T03:18:14.648647479Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 1f006480427f88f781c3f7b3cf5e3d0429c68bb082a6a9337363ea5ef5a5cd0b digest: 1f006480427f88f781c3f7b3cf5e3d0429c68bb082a6a9337363ea5ef5a5cd0b
name: csi-driver-smb name: csi-driver-smb
@ -30,7 +48,7 @@ entries:
version: v1.15.0 version: v1.15.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.14.0 appVersion: v1.14.0
created: "2025-01-23T14:00:07.500939915Z" created: "2025-05-12T03:18:14.647923836Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: a84e22518f5e6cd1d3fcb06ef8c7616371c96400e8db6227bc84cd0474f6cce1 digest: a84e22518f5e6cd1d3fcb06ef8c7616371c96400e8db6227bc84cd0474f6cce1
name: csi-driver-smb name: csi-driver-smb
@ -39,7 +57,7 @@ entries:
version: v1.14.0 version: v1.14.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.13.0 appVersion: v1.13.0
created: "2025-01-23T14:00:07.499696116Z" created: "2025-05-12T03:18:14.647166573Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 21ee866afbf5a59892c5588b00518e0f7853beac7643e8e558d440a260c6f142 digest: 21ee866afbf5a59892c5588b00518e0f7853beac7643e8e558d440a260c6f142
name: csi-driver-smb name: csi-driver-smb
@ -48,7 +66,7 @@ entries:
version: v1.13.0 version: v1.13.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.12.0 appVersion: v1.12.0
created: "2025-01-23T14:00:07.498677183Z" created: "2025-05-12T03:18:14.646455486Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: fccc852a3e723b9d273ea21d1d59697a0a94b65665406de1fd7c461bd894d2a3 digest: fccc852a3e723b9d273ea21d1d59697a0a94b65665406de1fd7c461bd894d2a3
name: csi-driver-smb name: csi-driver-smb
@ -57,7 +75,7 @@ entries:
version: v1.12.0 version: v1.12.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.11.0 appVersion: v1.11.0
created: "2025-01-23T14:00:07.498061001Z" created: "2025-05-12T03:18:14.645771573Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 1c0f9b72801cbeb240d06dfe665a58e4b6ac0c25c5315ee5b9fe7972362796d0 digest: 1c0f9b72801cbeb240d06dfe665a58e4b6ac0c25c5315ee5b9fe7972362796d0
name: csi-driver-smb name: csi-driver-smb
@ -66,7 +84,7 @@ entries:
version: v1.11.0 version: v1.11.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.10.0 appVersion: v1.10.0
created: "2025-01-23T14:00:07.497527687Z" created: "2025-05-12T03:18:14.645136083Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 82e460e6fa80da9ca523a86c28e001e15595d27c3507864f2123dbadc64c7fec digest: 82e460e6fa80da9ca523a86c28e001e15595d27c3507864f2123dbadc64c7fec
name: csi-driver-smb name: csi-driver-smb
@ -75,7 +93,7 @@ entries:
version: v1.10.0 version: v1.10.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.9.0 appVersion: v1.9.0
created: "2025-01-23T14:00:07.50852921Z" created: "2025-05-12T03:18:14.656784589Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 5c78c650b9755e508afecb3f6a554c549509023f7b0610b53853a41783d1c08f digest: 5c78c650b9755e508afecb3f6a554c549509023f7b0610b53853a41783d1c08f
name: csi-driver-smb name: csi-driver-smb
@ -84,7 +102,7 @@ entries:
version: v1.9.0 version: v1.9.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.8.0 appVersion: v1.8.0
created: "2025-01-23T14:00:07.506516659Z" created: "2025-05-12T03:18:14.655629087Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: d19d156c2143d753085bcbcb32506f8ebd7ebdee275e726f9c8d774a1f0b9f34 digest: d19d156c2143d753085bcbcb32506f8ebd7ebdee275e726f9c8d774a1f0b9f34
name: csi-driver-smb name: csi-driver-smb
@ -93,7 +111,7 @@ entries:
version: v1.8.0 version: v1.8.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.7.0 appVersion: v1.7.0
created: "2025-01-23T14:00:07.505978312Z" created: "2025-05-12T03:18:14.655090272Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 65594a1ff09d912a33ee0674bba1fad1f7c717638a281fb68bcfa2c98c288453 digest: 65594a1ff09d912a33ee0674bba1fad1f7c717638a281fb68bcfa2c98c288453
name: csi-driver-smb name: csi-driver-smb
@ -102,7 +120,7 @@ entries:
version: v1.7.0 version: v1.7.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.6.0 appVersion: v1.6.0
created: "2025-01-23T14:00:07.505456422Z" created: "2025-05-12T03:18:14.654563795Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 31dd4c8b0b0d4a61565631aa5b433b18b5375aeb24812bf4fa9958d5b7917485 digest: 31dd4c8b0b0d4a61565631aa5b433b18b5375aeb24812bf4fa9958d5b7917485
name: csi-driver-smb name: csi-driver-smb
@ -111,7 +129,7 @@ entries:
version: v1.6.0 version: v1.6.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.5.0 appVersion: v1.5.0
created: "2025-01-23T14:00:07.504890713Z" created: "2025-05-12T03:18:14.654036506Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: b7dc9e9dc5d46df12a6d1a5643efe86439bff6c36867968f772e6899692083d6 digest: b7dc9e9dc5d46df12a6d1a5643efe86439bff6c36867968f772e6899692083d6
name: csi-driver-smb name: csi-driver-smb
@ -120,7 +138,7 @@ entries:
version: v1.5.0 version: v1.5.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.4.0 appVersion: v1.4.0
created: "2025-01-23T14:00:07.504386204Z" created: "2025-05-12T03:18:14.653531382Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 9b1a6166ab72c09d0eefb448ecc998639b9f6255afb00bfc0ae0a4fdad76f119 digest: 9b1a6166ab72c09d0eefb448ecc998639b9f6255afb00bfc0ae0a4fdad76f119
name: csi-driver-smb name: csi-driver-smb
@ -129,7 +147,7 @@ entries:
version: v1.4.0 version: v1.4.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.3.0 appVersion: v1.3.0
created: "2025-01-23T14:00:07.503869331Z" created: "2025-05-12T03:18:14.652986342Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: d2236d36f1cb24139ddf87ea87229369ed856efc42330e656330f6cfa7635858 digest: d2236d36f1cb24139ddf87ea87229369ed856efc42330e656330f6cfa7635858
name: csi-driver-smb name: csi-driver-smb
@ -138,7 +156,7 @@ entries:
version: v1.3.0 version: v1.3.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.2.0 appVersion: v1.2.0
created: "2025-01-23T14:00:07.503409323Z" created: "2025-05-12T03:18:14.652463096Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 9d7099165db24d5412c95b298a59cca9b233ab8800d04efd34bb055812390915 digest: 9d7099165db24d5412c95b298a59cca9b233ab8800d04efd34bb055812390915
name: csi-driver-smb name: csi-driver-smb
@ -147,7 +165,7 @@ entries:
version: v1.2.0 version: v1.2.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.1.0 appVersion: v1.1.0
created: "2025-01-23T14:00:07.496949516Z" created: "2025-05-12T03:18:14.644500589Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 5b39613c9104db06815ee2d42fec8507c3bb2038264513449079a4eb5b6530a8 digest: 5b39613c9104db06815ee2d42fec8507c3bb2038264513449079a4eb5b6530a8
name: csi-driver-smb name: csi-driver-smb
@ -156,7 +174,7 @@ entries:
version: v1.1.0 version: v1.1.0
- apiVersion: v1 - apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
created: "2025-01-23T14:00:07.496462699Z" created: "2025-05-12T03:18:14.643990384Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 3e4721dd007cc51750f7221be8f66ec7e287c83a8cdcfeb9a71c30f526b06dc4 digest: 3e4721dd007cc51750f7221be8f66ec7e287c83a8cdcfeb9a71c30f526b06dc4
name: csi-driver-smb name: csi-driver-smb
@ -165,7 +183,7 @@ entries:
version: v1.0.0 version: v1.0.0
- apiVersion: v1 - apiVersion: v1
appVersion: v0.6.0 appVersion: v0.6.0
created: "2025-01-23T14:00:07.496174809Z" created: "2025-05-12T03:18:14.643708151Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 6fc9d05bc78ca98fb17071b7f5ad05b4c071f2403114d72feae99fb89ca1fc9f digest: 6fc9d05bc78ca98fb17071b7f5ad05b4c071f2403114d72feae99fb89ca1fc9f
name: csi-driver-smb name: csi-driver-smb
@ -174,7 +192,7 @@ entries:
version: v0.6.0 version: v0.6.0
- apiVersion: v1 - apiVersion: v1
appVersion: v0.5.0 appVersion: v0.5.0
created: "2025-01-23T14:00:07.495895636Z" created: "2025-05-12T03:18:14.643440061Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 8264c6630806325613234c2d7951c188d073607e6f0f89d781ec32afed04157b digest: 8264c6630806325613234c2d7951c188d073607e6f0f89d781ec32afed04157b
name: csi-driver-smb name: csi-driver-smb
@ -183,7 +201,7 @@ entries:
version: v0.5.0 version: v0.5.0
- apiVersion: v1 - apiVersion: v1
appVersion: v0.4.0 appVersion: v0.4.0
created: "2025-01-23T14:00:07.495612354Z" created: "2025-05-12T03:18:14.643101026Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: fb6d581ba5d4d1d78ca468f6daa4a24c47bb147b74d005d3c394521b4e534a3e digest: fb6d581ba5d4d1d78ca468f6daa4a24c47bb147b74d005d3c394521b4e534a3e
name: csi-driver-smb name: csi-driver-smb
@ -192,7 +210,7 @@ entries:
version: v0.4.0 version: v0.4.0
- apiVersion: v1 - apiVersion: v1
appVersion: v0.3.0 appVersion: v0.3.0
created: "2025-01-23T14:00:07.495332984Z" created: "2025-05-12T03:18:14.642814343Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: ee9e58db6d4a95491e2012c6607126bbff827b9c439e90e9a9798d2a73b0cb22 digest: ee9e58db6d4a95491e2012c6607126bbff827b9c439e90e9a9798d2a73b0cb22
name: csi-driver-smb name: csi-driver-smb
@ -201,7 +219,7 @@ entries:
version: v0.3.0 version: v0.3.0
- apiVersion: v1 - apiVersion: v1
appVersion: v0.2.0 appVersion: v0.2.0
created: "2025-01-23T14:00:07.495071293Z" created: "2025-05-12T03:18:14.642553459Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 8d8667106306d78dea9f63e5a3e8ee7ad2b60f86bd625f5968e37ca6a0cad317 digest: 8d8667106306d78dea9f63e5a3e8ee7ad2b60f86bd625f5968e37ca6a0cad317
name: csi-driver-smb name: csi-driver-smb
@ -210,20 +228,11 @@ entries:
version: v0.2.0 version: v0.2.0
- apiVersion: v1 - apiVersion: v1
appVersion: latest appVersion: latest
created: "2025-01-23T14:00:07.50726461Z" created: "2025-05-12T03:18:14.65624702Z"
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
digest: 37a15bd85f6f9f2df20aed317d9baa3774128552488d02c2897d561e67777963 digest: 37a15bd85f6f9f2df20aed317d9baa3774128552488d02c2897d561e67777963
name: csi-driver-smb name: csi-driver-smb
urls: urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.9.0/csi-driver-smb-v0.0.0.tgz - https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v1.9.0/csi-driver-smb-v0.0.0.tgz
version: v0.0.0 version: v0.0.0
- apiVersion: v1 generated: "2025-05-12T03:18:14.641362515Z"
appVersion: latest
created: "2025-01-23T14:00:07.494772956Z"
description: SMB CSI Driver for Kubernetes
digest: 827f43cf23fe307a04435bd192e6773773bbb9d54a840e3789295b0c5ab5a21a
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-v0.0.0.tgz
version: v0.0.0
generated: "2025-01-23T14:00:07.493874522Z"

Binary file not shown.

View File

@ -1,5 +1,5 @@
apiVersion: v1 apiVersion: v1
appVersion: latest appVersion: 1.18.0
description: SMB CSI Driver for Kubernetes description: SMB CSI Driver for Kubernetes
name: csi-driver-smb name: csi-driver-smb
version: v0.0.0 version: 1.18.0

View File

@ -1,8 +1,8 @@
image: image:
baseRepo: registry.k8s.io/sig-storage baseRepo: registry.k8s.io/sig-storage
smb: smb:
repository: gcr.io/k8s-staging-sig-storage/smbplugin repository: registry.k8s.io/sig-storage/smbplugin
tag: canary tag: v1.18.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
csiProvisioner: csiProvisioner:
repository: /csi-provisioner repository: /csi-provisioner

Binary file not shown.

View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: 1.18.0
description: SMB CSI Driver for Kubernetes
name: csi-driver-smb
version: 1.18.0

View File

@ -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="app.kubernetes.io/name={{ .Release.Name }}" --watch

View File

@ -0,0 +1,29 @@
{{/* 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 "+" "_" }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 2 -}}
{{- end }}
{{- end -}}
{{/* pull secrets for containers */}}
{{- define "smb.pullSecrets" -}}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end -}}

View File

@ -0,0 +1,48 @@
{{- if .Values.windows.csiproxy.enabled}}
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.windows.csiproxy.dsName }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: {{ .Values.windows.csiproxy.dsName }}
template:
metadata:
{{ include "smb.labels" . | indent 6 }}
app: {{ .Values.windows.csiproxy.dsName }}
spec:
{{- with .Values.windows.csiproxy.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: {{ .Values.windows.csiproxy.username | quote }}
hostNetwork: true
nodeSelector:
{{- with .Values.windows.csiproxy.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.node.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- include "smb.pullSecrets" . | indent 6 }}
containers:
- name: csi-proxy
{{- if hasPrefix "/" .Values.image.csiproxy.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiproxy.repository }}:{{ .Values.image.csiproxy.tag }}"
{{- else }}
image: "{{ .Values.image.csiproxy.repository }}:{{ .Values.image.csiproxy.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.csiproxy.pullPolicy }}
{{- end -}}

View File

@ -0,0 +1,181 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
spec:
strategy:
type: Recreate
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:
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
{{- if tpl "{{ .Values.controller.affinity }}" . | contains "nodeSelectorTerms" }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
{{- if .Values.controller.runOnControlPlane}}
- key: node-role.kubernetes.io/control-plane
operator: Exists
{{- end}}
{{- if .Values.controller.runOnMaster}}
- key: node-role.kubernetes.io/master
operator: Exists
{{- end}}
{{- end }}
hostNetwork: true
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
{{- with .Values.controller.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
node-role.kubernetes.io/master: ""
{{- end}}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- include "smb.pullSecrets" . | indent 6 }}
containers:
- name: csi-provisioner
{{- if hasPrefix "/" .Values.image.csiProvisioner.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
{{- else }}
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
{{- end }}
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
- "--extra-create-metadata=true"
- "--feature-gates=HonorPVReclaimPolicy=true"
- "--retry-interval-max=30m"
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 }}
securityContext:
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
- name: csi-resizer
{{- if hasPrefix "/" .Values.image.csiResizer.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}"
{{- else }}
image: "{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}"
{{- end }}
args:
- "-csi-address=$(ADDRESS)"
- "-v=2"
- "-leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
- '-handle-volume-inuse-error=false'
env:
- name: ADDRESS
value: /csi/csi.sock
imagePullPolicy: {{ .Values.image.csiResizer.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: liveness-probe
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- else }}
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- end }}
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --http-endpoint=localhost:{{ .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 }}
securityContext:
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
- name: smb
{{- if hasPrefix "/" .Values.image.smb.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- else }}
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- end }}
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 }}"
- "--working-mount-dir={{ .Values.controller.workingMountDir }}"
ports:
- containerPort: {{ .Values.controller.metricsPort }}
name: metrics
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
host: localhost
path: /healthz
port: {{ .Values.controller.livenessProbe.healthPort }}
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.smb | nindent 12 }}
volumes:
- name: socket-dir
emptyDir: {}

View File

@ -0,0 +1,13 @@
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ .Values.driver.name }}
spec:
attachRequired: false
podInfoOnMount: true
volumeLifecycleModes:
- Persistent
{{- if .Values.feature.enableInlineVolume }}
- Ephemeral
{{- end }}

View File

@ -0,0 +1,121 @@
{{- if and .Values.windows.enabled .Values.windows.useHostProcessContainers }}
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.windows.dsName }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
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
{{- with .Values.node.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.node.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
serviceAccountName: {{ .Values.serviceAccount.node }}
{{- include "smb.pullSecrets" . | indent 6 }}
securityContext:
seccompProfile:
type: RuntimeDefault
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
initContainers:
- name: init
{{- if hasPrefix "/" .Values.image.smb.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}-windows-hp"
{{- else }}
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}-windows-hp"
{{- end }}
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
command:
- "powershell.exe"
- "-c"
- "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\{{ .Values.driver.name }}\\ -Force"
securityContext:
capabilities:
drop:
- ALL
containers:
- name: node-driver-registrar
{{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- else }}
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- end }}
command:
- "csi-node-driver-registrar.exe"
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
- "--plugin-registration-path=$(PLUGIN_REG_DIR)"
- "--v=2"
env:
- name: CSI_ENDPOINT
value: unix://{{ .Values.windows.kubelet }}\plugins\{{ .Values.driver.name }}\csi.sock
- name: DRIVER_REG_SOCK_PATH
value: C:\\var\\lib\\kubelet\\plugins\\{{ .Values.driver.name }}\\csi.sock
- name: PLUGIN_REG_DIR
value: C:\\var\\lib\\kubelet\\plugins_registry\\
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: smb
{{- if hasPrefix "/" .Values.image.smb.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}-windows-hp"
{{- else }}
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}-windows-hp"
{{- end }}
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
command:
- "smbplugin.exe"
args:
- "--v={{ .Values.node.logLevel }}"
- "--drivername={{ .Values.driver.name }}"
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
- "--enable-get-volume-stats={{ .Values.feature.enableGetVolumeStats }}"
- "--remove-smb-mapping-during-unmount={{ .Values.windows.removeSMBMappingDuringUnmount }}"
- "--enable-windows-host-process=true"
env:
- name: CSI_ENDPOINT
value: unix://{{ .Values.windows.kubelet }}\plugins\{{ .Values.driver.name }}\csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
resources: {{- toYaml .Values.windows.resources.smb | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
{{- end -}}

View File

@ -0,0 +1,175 @@
{{- if and .Values.windows.enabled (not .Values.windows.useHostProcessContainers) }}
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.windows.dsName }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
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
{{- with .Values.node.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.node.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
serviceAccountName: {{ .Values.serviceAccount.node }}
{{- include "smb.pullSecrets" . | indent 6 }}
containers:
- name: liveness-probe
volumeMounts:
- mountPath: C:\csi
name: plugin-dir
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- else }}
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- end }}
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.image.livenessProbe.pullPolicy }}
resources: {{- toYaml .Values.windows.resources.livenessProbe | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: node-driver-registrar
{{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- else }}
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- end }}
args:
- --v=2
- --csi-address=$(CSI_ENDPOINT)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: CSI_ENDPOINT
value: unix://C:\\csi\\csi.sock
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.windows.kubelet | replace "\\" "\\\\" }}\\plugins\\{{ .Values.driver.name }}\\csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
volumeMounts:
- name: plugin-dir
mountPath: C:\csi
- name: registration-dir
mountPath: C:\registration
resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: smb
{{- if hasPrefix "/" .Values.image.smb.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- else }}
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
args:
- "--v={{ .Values.node.logLevel }}"
- "--drivername={{ .Values.driver.name }}"
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
- "--enable-get-volume-stats={{ .Values.feature.enableGetVolumeStats }}"
- "--remove-smb-mapping-during-unmount={{ .Values.windows.removeSMBMappingDuringUnmount }}"
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-v1
mountPath: \\.\pipe\csi-proxy-filesystem-v1
- name: csi-proxy-smb-pipe-v1
mountPath: \\.\pipe\csi-proxy-smb-v1
# these paths are still included for compatibility, they're used
# only if the node has still the beta version of the CSI proxy
- name: csi-proxy-fs-pipe-v1beta1
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
- name: csi-proxy-smb-pipe-v1beta1
mountPath: \\.\pipe\csi-proxy-smb-v1beta1
resources: {{- toYaml .Values.windows.resources.smb | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: csi-proxy-fs-pipe-v1
hostPath:
path: \\.\pipe\csi-proxy-filesystem-v1
- name: csi-proxy-smb-pipe-v1
hostPath:
path: \\.\pipe\csi-proxy-smb-v1
# these paths are still included for compatibility, they're used
# only if the node has still the beta version of the CSI proxy
- name: csi-proxy-fs-pipe-v1beta1
hostPath:
path: \\.\pipe\csi-proxy-filesystem-v1beta1
- name: csi-proxy-smb-pipe-v1beta1
hostPath:
path: \\.\pipe\csi-proxy-smb-v1beta1
- 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 -}}

View File

@ -0,0 +1,164 @@
{{- if .Values.linux.enabled}}
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.linux.dsName }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
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:
{{- with .Values.node.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
hostNetwork: true
dnsPolicy: {{ .Values.linux.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.node }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
{{- end }}
{{- with .Values.linux.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- include "smb.pullSecrets" . | indent 6 }}
containers:
- name: liveness-probe
volumeMounts:
- mountPath: /csi
name: socket-dir
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- else }}
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
{{- end }}
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --http-endpoint=localhost:{{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
resources: {{- toYaml .Values.linux.resources.livenessProbe | nindent 12 }}
securityContext:
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
- name: node-driver-registrar
{{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- else }}
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- end }}
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --v=2
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.linux.resources.nodeDriverRegistrar | nindent 12 }}
securityContext:
capabilities:
drop:
- ALL
- name: smb
{{- if hasPrefix "/" .Values.image.smb.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- else }}
image: "{{ .Values.image.smb.repository }}:{{ .Values.image.smb.tag }}"
{{- end }}
imagePullPolicy: {{ .Values.image.smb.pullPolicy }}
args:
- "--v={{ .Values.node.logLevel }}"
- "--drivername={{ .Values.driver.name }}"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
- "--enable-get-volume-stats={{ .Values.feature.enableGetVolumeStats }}"
- "--krb5-prefix={{ .Values.linux.krb5Prefix }}"
livenessProbe:
failureThreshold: 5
httpGet:
host: localhost
path: /healthz
port: {{ .Values.node.livenessProbe.healthPort }}
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
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: {{ .Values.linux.kubelet }}
mountPropagation: Bidirectional
name: mountpoint-dir
{{- if ne .Values.linux.krb5CacheDirectory "" }}
- mountPath: {{ .Values.linux.kubelet }}/kerberos/
mountPropagation: Bidirectional
name: krb5cache-dir
{{- end }}
resources: {{- toYaml .Values.linux.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 ne .Values.linux.krb5CacheDirectory "" }}
- hostPath:
path: {{ .Values.linux.krb5CacheDirectory }}
type: DirectoryOrCreate
name: krb5cache-dir
{{- end }}
{{- end -}}

View File

@ -0,0 +1,126 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.controller }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.node }}
namespace: {{ .Release.Namespace }}
{{ include "smb.labels" . | indent 2 }}
{{ end }}
{{- if .Values.rbac.create -}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "smb.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "patch", "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
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-resizer-role
{{ include "smb.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-resizer-role
{{ include "smb.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount.controller }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-resizer-role
apiGroup: rbac.authorization.k8s.io
---
{{- if .Values.feature.enableInlineVolume }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-{{ .Values.rbac.name }}-node-secret-role
{{ include "smb.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-{{ .Values.rbac.name }}-node-secret-binding
{{ include "smb.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount.node }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: csi-{{ .Values.rbac.name }}-node-secret-role
apiGroup: rbac.authorization.k8s.io
{{- end }}
{{ end }}

View File

@ -0,0 +1,182 @@
image:
baseRepo: registry.k8s.io/sig-storage
smb:
repository: registry.k8s.io/sig-storage/smbplugin
tag: v1.18.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: /csi-provisioner
tag: v5.2.0
pullPolicy: IfNotPresent
csiResizer:
repository: registry.k8s.io/sig-storage/csi-resizer
tag: v1.13.2
pullPolicy: IfNotPresent
livenessProbe:
repository: /livenessprobe
tag: v2.15.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: /csi-node-driver-registrar
tag: v2.13.0
pullPolicy: IfNotPresent
csiproxy:
repository: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy
tag: v1.1.2
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
node: csi-smb-node-sa
rbac:
create: true
name: smb
driver:
name: smb.csi.k8s.io
feature:
enableGetVolumeStats: true
enableInlineVolume: true
controller:
name: csi-smb-controller
replicas: 1
dnsPolicy: ClusterFirstWithHostNet # available values: Default, ClusterFirstWithHostNet, ClusterFirst
metricsPort: 29644
livenessProbe:
healthPort: 29642
runOnMaster: false
runOnControlPlane: false
logLevel: 5
workingMountDir: "/tmp"
resources:
csiProvisioner:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
csiResizer:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
smb:
limits:
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"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- key: "CriticalAddonsOnly"
operator: "Exists"
effect: "NoSchedule"
node:
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29643
affinity: {}
nodeSelector: {}
linux:
enabled: true
dsName: csi-smb-node # daemonset name
dnsPolicy: ClusterFirstWithHostNet # available values: Default, ClusterFirstWithHostNet, ClusterFirst
kubelet: /var/lib/kubelet
krb5CacheDirectory: "" # directory for kerberos credential cache, empty string means default(/var/lib/kubelet/kerberos/)
krb5Prefix: "" # prefix for kerberos credential cache, empty string means default(krb5cc_)
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
smb:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
windows:
enabled: true
useHostProcessContainers: true
dsName: csi-smb-node-win # daemonset name
kubelet: 'C:\var\lib\kubelet'
removeSMBMappingDuringUnmount: true
tolerations:
- key: "node.kubernetes.io/os"
operator: "Exists"
effect: "NoSchedule"
resources:
livenessProbe:
limits:
memory: 150Mi
requests:
cpu: 10m
memory: 40Mi
nodeDriverRegistrar:
limits:
memory: 150Mi
requests:
cpu: 10m
memory: 40Mi
smb:
limits:
memory: 600Mi
requests:
cpu: 10m
memory: 40Mi
csiproxy:
enabled: false # required if windows.enabled is true and useHostProcessContainers is false, but may be installed manually also
dsName: csi-proxy-win # daemonset name
tolerations: {}
affinity: {}
username: "NT AUTHORITY\\SYSTEM"
nodeSelector:
"kubernetes.io/os": windows
customLabels: {}
## 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: { seccompProfile: {type: RuntimeDefault} }

View File

@ -110,7 +110,7 @@ spec:
drop: drop:
- ALL - ALL
- name: smb - name: smb
image: gcr.io/k8s-staging-sig-storage/smbplugin:canary image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
args: args:
- "--v=5" - "--v=5"

View File

@ -34,7 +34,7 @@ spec:
hostNetwork: true hostNetwork: true
initContainers: initContainers:
- name: init - name: init
image: gcr.io/k8s-staging-sig-storage/smbplugin:canary-windows-hp image: registry.k8s.io/sig-storage/smbplugin:v1.18.0-windows-hp
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- "powershell.exe" - "powershell.exe"
@ -69,7 +69,7 @@ spec:
cpu: 30m cpu: 30m
memory: 40Mi memory: 40Mi
- name: smb - name: smb
image: gcr.io/k8s-staging-sig-storage/smbplugin:canary-windows-hp image: registry.k8s.io/sig-storage/smbplugin:v1.18.0-windows-hp
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- "smbplugin.exe" - "smbplugin.exe"

View File

@ -85,7 +85,7 @@ spec:
drop: drop:
- ALL - ALL
- name: smb - name: smb
image: gcr.io/k8s-staging-sig-storage/smbplugin:canary image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
args: args:
- --v=5 - --v=5

View File

@ -76,7 +76,7 @@ spec:
drop: drop:
- ALL - ALL
- name: smb - name: smb
image: gcr.io/k8s-staging-sig-storage/smbplugin:canary image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
args: args:
- "--v=5" - "--v=5"

View File

@ -0,0 +1,151 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-smb-controller
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: csi-smb-controller
template:
metadata:
labels:
app: csi-smb-controller
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet # available values: Default, ClusterFirstWithHostNet, ClusterFirst
serviceAccountName: csi-smb-controller-sa
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
securityContext:
seccompProfile:
type: RuntimeDefault
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- key: "CriticalAddonsOnly"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: csi-provisioner
image: registry.k8s.io/sig-storage/csi-provisioner:v5.2.0
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace=kube-system"
- "--feature-gates=HonorPVReclaimPolicy=true"
- "--extra-create-metadata=true"
- "--retry-interval-max=30m"
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- mountPath: /csi
name: socket-dir
resources:
limits:
cpu: 1
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: csi-resizer
image: registry.k8s.io/sig-storage/csi-resizer:v1.13.2
args:
- "-csi-address=$(ADDRESS)"
- "-v=2"
- "-leader-election"
- "--leader-election-namespace=kube-system"
- '-handle-volume-inuse-error=false'
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --http-endpoint=localhost:29642
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: smb
image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent
args:
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
- "--metrics-address=0.0.0.0:29644"
ports:
- containerPort: 29644
name: metrics
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
host: localhost
path: /healthz
port: 29642
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
securityContext:
privileged: true
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
resources:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: socket-dir
emptyDir: {}

View File

@ -0,0 +1,11 @@
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: smb.csi.k8s.io
spec:
attachRequired: false
podInfoOnMount: true
volumeLifecycleModes:
- Persistent
- Ephemeral

View File

@ -0,0 +1,95 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-smb-node-win
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: csi-smb-node-win
template:
metadata:
labels:
app: csi-smb-node-win
spec:
serviceAccountName: csi-smb-node-sa
tolerations:
- key: "node.kubernetes.io/os"
operator: "Exists"
effect: "NoSchedule"
nodeSelector:
kubernetes.io/os: windows
priorityClassName: system-node-critical
securityContext:
seccompProfile:
type: RuntimeDefault
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
initContainers:
- name: init
image: registry.k8s.io/sig-storage/smbplugin:v1.18.0-windows-hp
imagePullPolicy: IfNotPresent
command:
- "powershell.exe"
- "-c"
- "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\ -Force"
containers:
- name: node-driver-registrar
image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.13.0
imagePullPolicy: IfNotPresent
command:
- "csi-node-driver-registrar.exe"
args:
- "--v=2"
- "--csi-address=$(CSI_ENDPOINT)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
- "--plugin-registration-path=$(PLUGIN_REG_DIR)"
env:
- name: CSI_ENDPOINT
value: unix://C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\csi.sock
- name: DRIVER_REG_SOCK_PATH
value: C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\csi.sock
- name: PLUGIN_REG_DIR
value: C:\\var\\lib\\kubelet\\plugins_registry\\
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
resources:
limits:
memory: 150Mi
requests:
cpu: 30m
memory: 40Mi
- name: smb
image: registry.k8s.io/sig-storage/smbplugin:v1.18.0-windows-hp
imagePullPolicy: IfNotPresent
command:
- "smbplugin.exe"
args:
- --v=5
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
- --enable-windows-host-process=true
- --remove-smb-mapping-during-unmount=true
env:
- name: CSI_ENDPOINT
value: unix://C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
resources:
limits:
memory: 600Mi
requests:
cpu: 10m
memory: 40Mi

View File

@ -0,0 +1,166 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-smb-node-win
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
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
securityContext:
seccompProfile:
type: RuntimeDefault
serviceAccountName: csi-smb-node-sa
containers:
- name: liveness-probe
volumeMounts:
- mountPath: C:\csi
name: plugin-dir
image: registry.k8s.io/sig-storage/livenessprobe:v2.15.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:
memory: 100Mi
requests:
cpu: 10m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
- name: node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0
args:
- --v=2
- --csi-address=$(CSI_ENDPOINT)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: CSI_ENDPOINT
value: unix://C:\\csi\\csi.sock
- name: DRIVER_REG_SOCK_PATH
value: C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\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:
memory: 100Mi
requests:
cpu: 10m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
- name: smb
image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent
args:
- --v=5
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
- "--remove-smb-mapping-during-unmount=true"
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-v1
mountPath: \\.\pipe\csi-proxy-filesystem-v1
- name: csi-proxy-smb-pipe-v1
mountPath: \\.\pipe\csi-proxy-smb-v1
# these paths are still included for compatibility, they're used
# only if the node has still the beta version of the CSI proxy
- name: csi-proxy-fs-pipe-v1beta1
mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
- name: csi-proxy-smb-pipe-v1beta1
mountPath: \\.\pipe\csi-proxy-smb-v1beta1
resources:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 40Mi
securityContext:
capabilities:
drop:
- ALL
volumes:
- name: csi-proxy-fs-pipe-v1
hostPath:
path: \\.\pipe\csi-proxy-filesystem-v1
- name: csi-proxy-smb-pipe-v1
hostPath:
path: \\.\pipe\csi-proxy-smb-v1
# these paths are still included for compatibility, they're used
# only if the node has still the beta version of the CSI proxy
- name: csi-proxy-fs-pipe-v1beta1
hostPath:
path: \\.\pipe\csi-proxy-filesystem-v1beta1
- name: csi-proxy-smb-pipe-v1beta1
hostPath:
path: \\.\pipe\csi-proxy-smb-v1beta1
- 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

View File

@ -0,0 +1,132 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-smb-node
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: csi-smb-node
template:
metadata:
labels:
app: csi-smb-node
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet # available values: Default, ClusterFirstWithHostNet, ClusterFirst
serviceAccountName: csi-smb-node-sa
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
securityContext:
seccompProfile:
type: RuntimeDefault
tolerations:
- operator: "Exists"
containers:
- name: liveness-probe
volumeMounts:
- mountPath: /csi
name: socket-dir
image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --http-endpoint=localhost:29643
- --v=2
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --v=2
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:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
capabilities:
drop:
- ALL
- name: smb
image: registry.k8s.io/sig-storage/smbplugin:v1.18.0
imagePullPolicy: IfNotPresent
args:
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
livenessProbe:
failureThreshold: 5
httpGet:
host: localhost
path: /healthz
port: 29643
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
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /var/lib/kubelet/
mountPropagation: Bidirectional
name: mountpoint-dir
resources:
limits:
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
---

View File

@ -0,0 +1,111 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-smb-controller-sa
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-smb-node-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", "patch", "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
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: smb-external-resizer-role
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: smb-csi-resizer-role
subjects:
- kind: ServiceAccount
name: csi-smb-controller-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: smb-external-resizer-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-smb-node-secret-role
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-smb-node-secret-binding
subjects:
- kind: ServiceAccount
name: csi-smb-node-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: csi-smb-node-secret-role
apiGroup: rbac.authorization.k8s.io

View File

@ -0,0 +1,45 @@
## Install SMB CSI driver v1.18.0 version on a Kubernetes cluster
If you have already installed Helm, you can also use it to install this driver. Please check [Installation with Helm](../charts/README.md).
### Install by kubectl
- Option#1. remote install
```console
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v1.18.0/deploy/install-driver.sh | bash -s v1.18.0 --
```
- Option#2. local install
```console
git clone https://github.com/kubernetes-csi/csi-driver-smb.git
cd csi-driver-smb
git checkout v1.18.0
./deploy/install-driver.sh v1.18.0 local
```
- 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-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
- Option#1. remote uninstall
```console
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v1.18.0/deploy/uninstall-driver.sh | bash -s --
```
- Option#2. local uninstall
```console
git clone https://github.com/kubernetes-csi/csi-driver-smb.git
cd csi-driver-smb
git checkout v1.18.0
./deploy/uninstall-driver.sh v1.18.0 local
```

View File

@ -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)(only for testing purpose) - [install CSI driver master version](./install-csi-driver-master.md)(only for testing purpose)
- [install CSI driver v1.18.0 version](./install-csi-driver-v1.18.0.md)
- [install CSI driver v1.17.0 version](./install-csi-driver-v1.17.0.md) - [install CSI driver v1.17.0 version](./install-csi-driver-v1.17.0.md)
- [install CSI driver v1.16.0 version](./install-csi-driver-v1.16.0.md) - [install CSI driver v1.16.0 version](./install-csi-driver-v1.16.0.md)
- [install CSI driver v1.15.0 version](./install-csi-driver-v1.15.0.md)