Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
6d445b0
doc: use latest version for master branch
andyzhangx Sep 1, 2024
7a1545e
Merge pull request #836 from andyzhangx/cut-v1.16.0
andyzhangx Sep 3, 2024
197ae7e
chore(deps): bump build-image/debian-base in /cmd/smbplugin
dependabot[bot] Sep 4, 2024
d4481b1
Merge pull request #839 from kubernetes-csi/dependabot/docker/cmd/smb…
k8s-ci-robot Sep 4, 2024
894bd02
fix: chmod volume dir before deletion
mpatlasov Sep 4, 2024
e110f3d
Merge pull request #840 from mpatlasov/Chmod-volume-before-deletion
k8s-ci-robot Sep 5, 2024
fe1fb2f
chore: upgrade golint version
ScottZhuMS Sep 6, 2024
3f54a44
Merge pull request #842 from Zhupku/mengzezhu/upgrade-golint-version
k8s-ci-robot Sep 6, 2024
ff8a41d
fix: mount with 0777 in volume creation and deletion
andyzhangx Sep 8, 2024
e2db88a
test: fix trivy build error
andyzhangx Sep 8, 2024
f184d4d
Merge pull request #843 from andyzhangx/mount-with-0777
andyzhangx Sep 13, 2024
b87d98f
test: fix ut failure
andyzhangx Sep 13, 2024
85ec917
Merge pull request #847 from andyzhangx/fix-test-error
andyzhangx Sep 13, 2024
d21e3e0
chore: upgrade sidecar image versions
andyzhangx Sep 14, 2024
679857c
Merge pull request #849 from andyzhangx/upgrade-sidecar-images4
andyzhangx Sep 15, 2024
942e919
fix: remove parent dir in DeleteVolume
andyzhangx Sep 15, 2024
b6ded24
test: change one e2e test
andyzhangx Sep 15, 2024
902fe90
Merge pull request #850 from andyzhangx/remove-parent-dir
andyzhangx Sep 15, 2024
04ffb7d
fix: delete volume failure due to permission issue
andyzhangx Sep 16, 2024
68c09ad
Merge pull request #851 from andyzhangx/fix-delete-volume-permission
andyzhangx Sep 17, 2024
91bcb2b
test: use env var for enable driver install in e2e
Phaow Sep 30, 2024
b75140b
Merge pull request #854 from Phaow/hotfix
k8s-ci-robot Oct 1, 2024
47c20a6
Update README.md
andyzhangx Oct 13, 2024
932c718
fix: mount options for fsGroup delegation must ensure RWX for the group
mpatlasov Sep 13, 2024
31dedc6
Add more unit-tests for NodeStageVolume()
mpatlasov Oct 16, 2024
93acf41
Add unit-tests for NodeStageVolume() helpers
mpatlasov Oct 16, 2024
6642f04
Merge pull request #848 from mpatlasov/Fix-fsGroup-behavior
k8s-ci-robot Oct 19, 2024
c7b22de
Merge commit 'c716b8c04fb1dad3c75e7ebdf3bf989a34e6a30f' into go-guild…
andyzhangx Oct 20, 2024
c716b8c
Squashed 'release-tools/' changes from f40f0ccd4..227577e00
andyzhangx Oct 20, 2024
589c324
Merge pull request #857 from andyzhangx/go-guild-1.22.5
andyzhangx Oct 20, 2024
4e1642c
fix: add CriticalAddonsOnly toleration into controller pod
andyzhangx Oct 20, 2024
c8b60b1
Merge pull request #858 from andyzhangx/add-CriticalAddonsOnly-tolera…
andyzhangx Oct 21, 2024
9efec69
test: fix trivy action
andyzhangx Nov 7, 2024
c1087f1
Merge pull request #860 from andyzhangx/fix-trivy2
andyzhangx Nov 7, 2024
4ac586c
use util wait func
umagnus Nov 14, 2024
3d4721a
Merge pull request #862 from umagnus/use_util_wait_func
k8s-ci-robot Nov 14, 2024
24cd1f1
chore: update CSI spec to v1.10.0
andyzhangx Nov 22, 2024
1715f7e
chore: fix govet
andyzhangx Nov 22, 2024
fd195fe
Merge pull request #863 from andyzhangx/upgrade-csi-spec
andyzhangx Nov 23, 2024
4285be0
chore: update dependabot
andyzhangx Nov 23, 2024
d403265
Merge pull request #864 from andyzhangx/update-dependabot
andyzhangx Nov 23, 2024
057048e
cleanup: remove unused livenessProble in registrar container
andyzhangx Nov 25, 2024
25fb5ec
Merge pull request #867 from andyzhangx/remove-livenessProbe
andyzhangx Nov 26, 2024
e231bf4
remove group update rule
MartinForReal Nov 27, 2024
e5c1798
Merge pull request #870 from MartinForReal/patch-1
k8s-ci-robot Nov 27, 2024
d47bd78
chore(deps): bump k8s.io/klog/v2 from 2.110.1 to 2.130.1
dependabot[bot] Nov 29, 2024
ccb8ff6
Merge pull request #873 from kubernetes-csi/dependabot/go_modules/k8s…
k8s-ci-robot Nov 29, 2024
c127ba9
test: add read-only subdir e2e test
Phaow Nov 29, 2024
c5f0687
Merge pull request #874 from Phaow/e2e
k8s-ci-robot Nov 30, 2024
de81f37
feat: add volume resize support
andyzhangx Dec 8, 2024
b223fda
Merge pull request #881 from andyzhangx/expand-vol
andyzhangx Dec 8, 2024
119d55c
Merge commit '2ae52b4ea3e13b5965765e71a78b69a45f9cf813' into upgrade-…
andyzhangx Dec 10, 2024
2ae52b4
Squashed 'release-tools/' changes from 227577e00..98f23071d
andyzhangx Dec 10, 2024
fc83f7a
Merge pull request #883 from andyzhangx/upgrade-release-tools
andyzhangx Dec 10, 2024
dc12f41
fix: runOnControlPlane chart config
andyzhangx Dec 10, 2024
5a9dda4
fix: runOnControlPlane chart config in v1.16.0
andyzhangx Dec 10, 2024
975289f
doc: add allowVolumeExpansion in examples
andyzhangx Dec 10, 2024
877fd51
fix: use godebug winsymlink
andyzhangx Dec 10, 2024
c9215d1
Merge pull request #884 from andyzhangx/use-winsymlink
andyzhangx Dec 11, 2024
a8dbff5
Merge pull request #882 from andyzhangx/fix-runOnControlPlane
andyzhangx Dec 11, 2024
6d66b3c
fix: controller.runOnMaster chart config
andyzhangx Dec 11, 2024
d13ea1e
Merge pull request #886 from andyzhangx/fix-runOnMaster2
andyzhangx Dec 11, 2024
ef67340
Update driver-parameters.md
andyzhangx Dec 11, 2024
3955b75
fix: CVE-2024-45337
andyzhangx Dec 12, 2024
275b796
Merge pull request #887 from andyzhangx/CVE-2024-45337
andyzhangx Dec 13, 2024
fa78fea
chore: upgrade k8s.io/mount-utils to v1.32.0
andyzhangx Dec 15, 2024
1a428fe
test: upgrade csi-test to v5.3.1
andyzhangx Dec 15, 2024
59e5876
Merge pull request #889 from andyzhangx/upgrade-csi-test-5.3.1
andyzhangx Dec 15, 2024
f661a87
Merge pull request #888 from andyzhangx/upgrade-mount-utils
andyzhangx Dec 15, 2024
644ebe4
fix: CVE-2024-45338
andyzhangx Dec 19, 2024
40c322c
Merge pull request #891 from andyzhangx/CVE-2024-45338
andyzhangx Dec 19, 2024
534c4ed
Squashed 'release-tools/' changes from 98f23071d..049659326
andyzhangx Dec 23, 2024
f5fde8c
Merge commit '534c4ed460e7fb72adbaa3715804667fb6aba1e9' into update-c…
andyzhangx Dec 23, 2024
9d258aa
Merge pull request #892 from andyzhangx/update-csi-release-tools
andyzhangx Dec 23, 2024
afd4267
fix: increase default provisioner retry-interval-max
andyzhangx Dec 24, 2024
5620c63
Merge pull request #893 from andyzhangx/increase-retry-interval-max
andyzhangx Dec 24, 2024
d1fdafa
test: add unit test for main function
andyzhangx Dec 24, 2024
9c7e069
Merge pull request #894 from andyzhangx/main-test
andyzhangx Dec 24, 2024
fb9c5b3
chore: update version in Makefile on master branch
andyzhangx Dec 27, 2024
dec96df
feat: support windows host-process deployment
andyzhangx Dec 27, 2024
b2d2d00
Merge pull request #895 from andyzhangx/hpc2
andyzhangx Dec 31, 2024
0edb091
chore: support windows hpc image build
andyzhangx Dec 31, 2024
15c3f62
Merge pull request #896 from andyzhangx/support-win-hpc-image-build
andyzhangx Jan 1, 2025
57fb626
fix: windows hpc image build failure
andyzhangx Jan 1, 2025
dc3b6b4
fix: windows hpc image build failure#2
andyzhangx Jan 1, 2025
f9f3c34
fix: windows hpc image build failure#3
andyzhangx Jan 1, 2025
a530a2b
fix: windows hpc image build failure#4
andyzhangx Jan 1, 2025
79e848d
fix: windows hpc image build failure#5
andyzhangx Jan 1, 2025
e195012
fix: windows hpc image build failure#6
andyzhangx Jan 1, 2025
68eb1c0
chore: use canary-windows-hp for host process deployment
andyzhangx Jan 2, 2025
def094d
fix: windows hpc image build failure#7
andyzhangx Jan 2, 2025
f857bf2
test: use new samber image
andyzhangx Jan 2, 2025
0737748
Merge pull request #897 from andyzhangx/use-canary-windows-hp
andyzhangx Jan 3, 2025
6252340
test: fix windows hpc test failure
andyzhangx Jan 11, 2025
8941441
Merge pull request #903 from andyzhangx/fix-hpc-test-failure
andyzhangx Jan 11, 2025
45c2275
feat: enable host process deployment for windows daemonset by default
andyzhangx Jan 11, 2025
d0687af
Merge pull request #904 from andyzhangx/enable-hpc-by-default
andyzhangx Jan 12, 2025
8105a9d
feat: inline volume support
andyzhangx Jan 12, 2025
9df3b58
feat: add feature flag for inline volume support
andyzhangx Jan 13, 2025
613018d
Merge pull request #905 from andyzhangx/inline-volume
andyzhangx Jan 17, 2025
3f39cbd
fix: support base64password field in secret
andyzhangx Jan 18, 2025
7f78b7a
Merge pull request #906 from andyzhangx/fix-password
andyzhangx Jan 22, 2025
c1138d0
Revert "feat: support base64password field in secret"
andyzhangx Jan 22, 2025
7dcb9ea
Merge pull request #908 from kubernetes-csi/revert-906-fix-password
andyzhangx Jan 22, 2025
46fb162
chore: upgrade CSI driver sidecar image versions
andyzhangx Jan 22, 2025
4b3ffb4
test: add unit test
andyzhangx Jan 22, 2025
4fb7ea9
Merge pull request #910 from andyzhangx/upgrade-sidecar-images6
andyzhangx Jan 23, 2025
760cf48
doc: cut v1.17.0 release
andyzhangx Jan 23, 2025
eda7f71
Merge remote-tracking branch 'openshift/master' into rebase-1.17.0
rhrmo Feb 6, 2025
2263a2a
UPSTREAM: <carry>: Add OpenShift files
dfajmon Jul 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include release-tools/build.make
GIT_COMMIT := $(shell git rev-parse HEAD)
REGISTRY ?= andyzhangx
REGISTRY_NAME := $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
IMAGE_VERSION ?= v1.16.0
IMAGE_VERSION ?= v1.17.0
VERSION ?= latest
# Use a custom version for E2E tests if we are testing in CI
ifdef CI
Expand All @@ -44,7 +44,7 @@ BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
endif
LDFLAGS = -X ${PKG}/pkg/smb.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/smb.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/smb.buildDate=${BUILD_DATE}
EXT_LDFLAGS = -s -w -extldflags "-static"
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION)
E2E_HELM_OPTIONS ?= --set image.smb.repository=$(REGISTRY)/$(IMAGENAME) --set image.smb.tag=$(IMAGE_VERSION) --set controller.runOnControlPlane=true
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
# Generate all combination of all OS, ARCH, and OSVERSIONS for iteration
ALL_OS = linux windows
Expand Down Expand Up @@ -102,11 +102,16 @@ e2e-test:

.PHONY: e2e-bootstrap
e2e-bootstrap: install-helm
ifdef WINDOWS_USE_HOST_PROCESS_CONTAINERS
(docker pull $(IMAGE_TAG) && docker pull $(IMAGE_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 \
Expand Down Expand Up @@ -162,6 +167,24 @@ container-windows:
-t $(IMAGE_TAG)-windows-$(OSVERSION)-$(ARCH) --build-arg OSVERSION=$(OSVERSION) \
--provenance=false --sbom=false \
--build-arg ARCH=$(ARCH) -f ./cmd/smbplugin/Dockerfile.Windows .
# workaround: only build hostprocess image once
ifdef WINDOWS_USE_HOST_PROCESS_CONTAINERS
ifeq ($(OSVERSION),ltsc2022)
$(MAKE) container-windows-hostprocess
$(MAKE) container-windows-hostprocess-latest
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.WindowsHostProcess .

.PHONY: container-windows-hostprocess-latest
container-windows-hostprocess-latest:
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="windows/$(ARCH)" --provenance=false --sbom=false \
-t $(IMAGE_TAG_LATEST)-windows-hp -f ./cmd/smbplugin/Dockerfile.WindowsHostProcess .

.PHONY: container-all
container-all: smb-windows
Expand Down Expand Up @@ -206,14 +229,18 @@ ifdef PUBLISH
done; \
done
docker manifest inspect $(IMAGE_TAG_LATEST)
docker manifest create --amend $(IMAGE_TAG_LATEST)-windows-hp $(IMAGE_TAG_LATEST)-windows-hp
docker manifest inspect $(IMAGE_TAG_LATEST)-windows-hp
endif

.PHONY: push-latest
push-latest:
ifdef CI
docker manifest push --purge $(IMAGE_TAG_LATEST)
docker manifest push --purge $(IMAGE_TAG_LATEST)-windows-hp
else
docker push $(IMAGE_TAG_LATEST)
docker push $(IMAGE_TAG_LATEST)-windows-hp
endif

.PHONY: install-smb-provisioner
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/csi-driver-smb)](https://artifacthub.io/packages/search?repo=csi-driver-smb)

### About
This driver allows Kubernetes to access [SMB](https://wiki.wireshark.org/SMB) server on both Linux and Windows nodes, plugin name: `smb.csi.k8s.io`. The driver requires existing and already configured SMB server, it supports dynamic provisioning of Persistent Volumes via Persistent Volume Claims by creating a new sub directory under SMB server.
This driver allows Kubernetes to access [SMB](https://wiki.wireshark.org/SMB) server on both Linux and Windows nodes, plugin name: `smb.csi.k8s.io`. The driver requires existing configured SMB server, it supports dynamic provisioning of Persistent Volumes via Persistent Volume Claims by creating a new sub directory under SMB server.

### Project status: GA

### Container Images & Kubernetes Compatibility:
|Driver Version | supported k8s version | supported [Windows csi-proxy](https://github.com/kubernetes-csi/csi-proxy) version |
|---------------|-----------------------|-------------------------------------|
|master branch | 1.21+ | v0.2.2+ |
|v1.17.0 | 1.21+ | v0.2.2+ |
|v1.16.0 | 1.21+ | v0.2.2+ |
|v1.15.0 | 1.21+ | v0.2.2+ |
|v1.14.0 | 1.21+ | v0.2.2+ |

### Driver parameters
Please refer to `smb.csi.k8s.io` [driver parameters](./docs/driver-parameters.md)
Expand Down
19 changes: 10 additions & 9 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@

- run smb-controller on control plane node: `--set controller.runOnControlPlane=true`
- Microk8s based kubernetes recommended settings:
- `--set linux.kubelet="/var/snap/microk8s/common/var/lib/kubelet"` - sets correct path to microk8s kubelet even
though a user has a folder link to it.
- `--set linux.kubelet="/var/snap/microk8s/common/var/lib/kubelet"` - sets correct path to microk8s kubelet even though a user has a folder link to it.

### install a specific version

```console
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.16.0
helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-system --version v1.17.0
```

### install driver with customized driver name, deployment name
Expand Down Expand Up @@ -52,13 +51,13 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `image.smb.repository` | csi-driver-smb docker image | `gcr.io/k8s-staging-sig-storage/smbplugin` |
| `image.smb.tag` | csi-driver-smb docker image tag | `canary` |
| `image.smb.pullPolicy` | csi-driver-smb image pull policy | `IfNotPresent` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v5.0.2` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v5.2.0` |
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | `IfNotPresent` |
| `image.livenessProbe.repository` | liveness-probe docker image | `/livenessprobe` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.13.1` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.15.0` |
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | `IfNotPresent` |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `/csi-node-driver-registrar` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.11.1` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.13.0` |
| `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | `IfNotPresent` |
| `imagePullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `serviceAccount.create` | whether create service account of csi-smb-controller | `true` |
Expand All @@ -77,7 +76,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `controller.workingMountDir` | working directory for provisioner to mount smb shares temporarily | `/tmp` |
| `controller.runOnMaster` | run controller on master node | `false` |
| `controller.runOnControlPlane` | run controller on control plane node | `false` |
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | `100Mi` |
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | `400Mi` |
| `controller.resources.csiProvisioner.requests.cpu` | csi-provisioner cpu requests limits | `10m` |
| `controller.resources.csiProvisioner.requests.memory` | csi-provisioner memory requests limits | `20Mi` |
| `controller.resources.livenessProbe.limits.memory` | liveness-probe memory limits | `300Mi` |
Expand All @@ -86,7 +85,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `controller.resources.smb.limits.memory` | smb-csi-driver memory limits | `200Mi` |
| `controller.resources.smb.requests.cpu` | smb-csi-driver cpu requests limits | `10m` |
| `controller.resources.smb.requests.memory` | smb-csi-driver memory requests limits | `20Mi` |
| `controller.resources.csiResizer.limits.memory` | csi-resizer memory limits | `300Mi` |
| `controller.resources.csiResizer.limits.memory` | csi-resizer memory limits | `400Mi` |
| `controller.resources.csiResizer.requests.cpu` | csi-resizer cpu requests limits | `10m` |
| `controller.resources.csiResizer.requests.memory` | csi-resizer memory requests limits | `20Mi` |
| `controller.affinity` | controller pod affinity | `{}` |
Expand All @@ -112,7 +111,8 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `linux.resources.smb.limits.memory` | smb-csi-driver memory limits | `200Mi` |
| `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.enabled` | whether enable windows feature | `true` |
| `windows.useHostProcessContainers` | whether deploy driver daemonset with HostProcess containers on windows | `true` |
| `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` |
Expand All @@ -127,6 +127,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `windows.kubelet` | configure kubelet directory path on Windows agent node | `'C:\var\lib\kubelet'` |

### Csi Proxy support on windows
> if you have set `windows.useHostProcessContainers` as `true`, csi-proxy is not needed by CSI driver.

The helm can setup the host-process deamonset for the csi proxy, by setting windows.csiproxy.enabled to true.

Expand Down
Loading