From 15b1714717d92f8dee241c7e4c70aadffca7e627 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Sun, 10 Dec 2023 02:42:27 +0000 Subject: [PATCH] feat: add hpc chart support --- Makefile | 18 +++ charts/README.md | 1 + charts/latest/csi-driver-smb-v0.0.0.tgz | Bin 4788 -> 5085 bytes .../csi-smb-node-windows-hostprocess.yaml | 119 ++++++++++++++++++ .../templates/csi-smb-node-windows.yaml | 2 +- charts/latest/csi-driver-smb/values.yaml | 5 +- 6 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 charts/latest/csi-driver-smb/templates/csi-smb-node-windows-hostprocess.yaml diff --git a/Makefile b/Makefile index d64ff95aaf1..074b233175f 100644 --- a/Makefile +++ b/Makefile @@ -98,11 +98,16 @@ e2e-test: .PHONY: e2e-bootstrap e2e-bootstrap: install-helm +ifdef WINDOWS_USE_HOST_PROCESS_CONTAINERS + (docker pull $(IMAGE_TAG) && docker pull $(CSI_IMAGEIMAGE_TAG_TAG)-windows-hp) || make container-all push-manifest +else docker pull $(IMAGE_TAG) || make container-all push-manifest +endif ifdef TEST_WINDOWS helm upgrade csi-driver-smb charts/$(VERSION)/csi-driver-smb --namespace kube-system --wait --timeout=15m -v=5 --debug --install \ ${E2E_HELM_OPTIONS} \ --set windows.enabled=true \ + --set windows.useHostProcessContainers=${WINDOWS_USE_HOST_PROCESS_CONTAINERS} \ --set linux.enabled=false \ --set controller.replicas=1 \ --set controller.logLevel=6 \ @@ -162,6 +167,19 @@ container-windows: --build-arg BASE_IMAGE=nanoserver:$(OSVERSION) \ -f ./cmd/smbplugin/Dockerfile.Windows . +# workaround: only build hostprocess image once +ifdef WINDOWS_USE_HOST_PROCESS_CONTAINERS +ifeq ($(OSVERSION),ltsc2022) + $(MAKE) container-windows-hostprocess +endif +endif + +# Set --provenance=false to not generate the provenance (which is what causes the multi-platform index to be generated, even for a single platform). +.PHONY: container-windows-hostprocess +container-windows-hostprocess: + docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="windows/$(ARCH)" --provenance=false --sbom=false \ + -t $(IMAGE_TAG)-windows-hp -f ./cmd/smbplugin/Dockerfile.Windows.hostprocess . + .PHONY: container-all container-all: smb-windows docker buildx rm container-builder || true diff --git a/charts/README.md b/charts/README.md index a01fa5173ec..4d441b03ace 100644 --- a/charts/README.md +++ b/charts/README.md @@ -112,6 +112,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv | `linux.resources.smb.requests.cpu` | smb-csi-driver cpu requests limits | `10m` | | `linux.resources.smb.requests.memory` | smb-csi-driver memory requests limits | `20Mi` | | `windows.enabled` | whether enable windows feature | `false` | +| `windows.useHostProcessContainers` | whether deploy driver daemonset with host process containers on windows | `false` | | `windows.dsName` | name of driver daemonset on windows | `csi-smb-node-win` | | `windows.removeSMBMappingDuringUnmount` | remove SMBMapping during unmount on Windows node windows | `true` | | `windows.resources.livenessProbe.limits.memory` | liveness-probe memory limits | `200Mi` | diff --git a/charts/latest/csi-driver-smb-v0.0.0.tgz b/charts/latest/csi-driver-smb-v0.0.0.tgz index 74e6d05cc257a790c725700e56a4f85c1da29e83..261bae09f73884508aacd8bb6073c68a5eabd7dc 100644 GIT binary patch delta 5055 zcmV;w6F}^=CEX{GJb(Ld<2Leme>SlH1K};u_P#5>^4Ok${IHv(ZP4a{INL*UJ}hWy zZ1cO4sFIWuUz-2@1Cn}+vgJpzyH^v~jV+Ng)4 zy{&PT2ltf}9FpIGaY6$d&HF7JhUr%i3*e&V0(Te*g?cu;e2-3t7wAl}44P1eevQV! z0uaDk0rtU0MV4yKQ}De`uhVON?h)@xzLeyDj=c!@jupUi`S167y`!@H502jM<^LrL z@$nSw7D8jp;eQrFY9j_y!UbD&KK;l$gmyWZT3k?ur_e%(`(s%hAqFAkL{PS{(bQqG z=BFRI#RZ;{U~1)Bb-6zdy=Y1T)llH6jT{_cwou>0$n$QfN1TO?E+$u0+%Vt}h!&En zp`#{GfB(8LUF>kvRmw`F{@$)b0vDY%5Z58ZigBMr~3qvX4FyJ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^%G_Sqv0YtgADzB^Nrjq1egBfw!y#DOEs0C7Qr zAdOY{<^XvZV?jnFAY%SnwwV9O03}>qESCpHqkmv7jiS2nfchYz4&SGD zA)F51qwLb#CUlihwjge``BDn6k4=-g+-_aBWP@z=3MNzsJY}bg>S#TVY|4#mA}g`x z&e(ECEV&LlZbRlGthM-ZBZAxUE%CyaVOg$q%?j#cdJlI|4eMON8DT19T_wC-?QhZl-z|R+VnzPHVC``oXc7EhJ=tzy#Uf8pThPV&66MJqFn&5w;5%5QsOw3u&gnnu@0J9n5w zH*Uc9ob9eqL(kAReR6W!e0YM!);c7MICM?Kp<5eq*zElGZd1n_oL1c= zaopV~ZCqB%`=s$cX}tD1*Sfs173wY%$NPlt_nXjNZ6m(bWbXDZDO!HM^_h>YR)5T@ z)yOa!;|bQk{rryjDr`?^gad0AR2!u~);ix>Hb-kE3maxG*7qVBr7apv!scDvs0TH3 zur;9;sjkhsRdH$d37>DG)aHNK2z!o60zGN|r+0Ap=1nF4GuZ$B&$E6o38AqVl`!>BB?1hA1adqzo>b1N9y!VoDkLk5aAG zbKCj{n{H?T%ZI998Pn&$y^xECAb)?Kx`MIspjZ-UJMBpC>sLmTn7ino?e@P~C5Paj z?O2Y73y6fV@21iW*hp2FfM~x)?SOFgSN*J${GdrAKl##Hfoit_LNCB1Y=4YZCmU_J ziihWIm`x2Yz??T6XTveU3?i`s<;-Yaqjp?}ZuPJ{PNZz?bU<4H^eAOMiSjaG!=a@1 zX^3W>eUlQh;QN;n?yAtfBau&{NprDpF65>AIh~O~)j0W{jQ&4(!brJQxn};~I+x=% yQLa)MnblrZ(QU5Y&|(sokR3UvvA?$Y-j{vZmwnl|{9gb70RR64Lf6*-jsO4$k9>;& diff --git a/charts/latest/csi-driver-smb/templates/csi-smb-node-windows-hostprocess.yaml b/charts/latest/csi-driver-smb/templates/csi-smb-node-windows-hostprocess.yaml new file mode 100644 index 00000000000..a9f8edb873a --- /dev/null +++ b/charts/latest/csi-driver-smb/templates/csi-smb-node-windows-hostprocess.yaml @@ -0,0 +1,119 @@ +{{- 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 }} + securityContext: + seccompProfile: + type: RuntimeDefault + windowsOptions: + hostProcess: true + runAsUserName: "NT AUTHORITY\\SYSTEM" + serviceAccountName: {{ .Values.serviceAccount.node }} + {{- include "smb.pullSecrets" . | indent 6 }} + 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.pullPolicy }} + command: + - "powershell.exe" + - "-c" + - "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\{{ .Values.driver.name }}\\ -Force" + 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: + - --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:\\csi\\csi.sock + - name: DRIVER_REG_SOCK_PATH + value: {{ .Values.windows.kubelet | replace "\\" "\\\\" }}\\plugins\\{{ .Values.driver.name }}\\csi.sock + - name: PLUGIN_REG_DIR + value: {{ .Values.windows.kubelet | replace "\\" "\\\\" }}\\plugins_registry\\ + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }} + resources: {{- toYaml .Values.windows.resources.nodeDriverRegistrar | nindent 12 }} + - 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 }}" + 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 + resources: {{- toYaml .Values.windows.resources.smb | nindent 12 }} +{{- end -}} diff --git a/charts/latest/csi-driver-smb/templates/csi-smb-node-windows.yaml b/charts/latest/csi-driver-smb/templates/csi-smb-node-windows.yaml index b033b151c97..ad5663c6029 100755 --- a/charts/latest/csi-driver-smb/templates/csi-smb-node-windows.yaml +++ b/charts/latest/csi-driver-smb/templates/csi-smb-node-windows.yaml @@ -1,4 +1,4 @@ -{{- if .Values.windows.enabled}} +{{- if and .Values.windows.enabled (not .Values.windows.useHostProcessContainers) }} kind: DaemonSet apiVersion: apps/v1 metadata: diff --git a/charts/latest/csi-driver-smb/values.yaml b/charts/latest/csi-driver-smb/values.yaml index 35c35fd9054..9f288ffa9f5 100755 --- a/charts/latest/csi-driver-smb/values.yaml +++ b/charts/latest/csi-driver-smb/values.yaml @@ -115,7 +115,8 @@ linux: memory: 20Mi windows: - enabled: false # Unless you already had csi proxy installed, windows.csiproxy.enabled=true is required + enabled: false + useHostProcessContainers: false dsName: csi-smb-node-win # daemonset name kubelet: 'C:\var\lib\kubelet' removeSMBMappingDuringUnmount: true @@ -143,7 +144,7 @@ windows: cpu: 10m memory: 40Mi csiproxy: - enabled: false # required if windows.enabled is true, but may be installed manually also + enabled: false # set as false if csi-proxy is already installed on the node or useHostProcessContainers is true dsName: csi-proxy-win # daemonset name tolerations: {} affinity: {}