Compare commits

..

445 Commits

Author SHA1 Message Date
godlzr 6eba33cdd8 add 4.2 2025-05-31 11:42:37 -04:00
godlzr 453035743a add 4.2 2025-05-31 11:41:34 -04:00
zli f9c94f7666 更新 charts/v4.0.0/csi-driver-nfs/values.yaml 2025-05-31 15:28:07 +00:00
zli 893fd5e4a8 更新 charts/index.yaml 2025-05-31 15:17:14 +00:00
zli 48c0655c01 更新 'charts/index.yaml' 2022-05-20 04:31:16 +00:00
zli d5965b8534 更新 'charts/index.yaml' 2022-05-20 04:11:26 +00:00
Kubernetes Prow Robot bc945f58fc
Merge pull request #343 from humblec/update
chore: update node-driver-registrar,liveness to latest version
2022-05-17 05:48:27 -07:00
andyzhangx 1217998c69 chore: upgrade sidecar for controller 2022-05-17 12:07:24 +00:00
Andy Zhang 449ec667c9
Merge pull request #342 from andyzhangx/ipv6
feat: support IPv6 server address
2022-05-17 20:03:04 +08:00
Humble Chirammal fcff40f974 helm chart update for new sidecar releases.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-05-17 15:16:42 +05:30
Humble Chirammal ad6a05366d chore: update node-driver-registrar and liveness probe to latest
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-05-17 14:33:58 +05:30
andyzhangx ba1b9dd8d4 test: add IPv6 unit test 2022-05-15 06:58:34 +00:00
andyzhangx dcd24e51e6 feat: support IPv6 server address 2022-05-15 06:54:04 +00:00
Andy Zhang 41af4a17db
Update csi-debug.md 2022-05-15 10:36:59 +08:00
Andy Zhang 57db097885
Merge pull request #341 from andyzhangx/refine-bypass-chmod
chore: refine bypass chmod code
2022-05-14 10:17:38 +08:00
andyzhangx d2344ce642 chore: refine bypass chmod code 2022-05-13 13:45:47 +00:00
Andy Zhang 09c83624be
Merge pull request #340 from andyzhangx/check-before-chmod
fix: bypass chmod if mounting point permissions are correct
2022-05-13 11:24:41 +08:00
andyzhangx 770d104c4a fix: check mount dir mode before chmod
fix
2022-05-12 13:16:43 +00:00
Andy Zhang 5a59082977
Merge pull request #336 from andyzhangx/remove-hard-option
chore: remove hard mount option
2022-05-12 15:58:54 +08:00
andyzhangx ce9eab1857 chore: remove hard mount option 2022-05-11 07:36:43 +00:00
Andy Zhang e9ceb486bc
Merge pull request #335 from andyzhangx/node-serviceAccount
fix: add serviceAccount for driver daemonset running on the node
2022-05-11 14:55:44 +08:00
andyzhangx 9760565472 chore: add serviceAccount for driver daemonset running on the node
fix yamllint
2022-05-10 12:44:55 +00:00
Andy Zhang 20f589c7ef
Update README.md 2022-05-10 10:57:59 +08:00
Andy Zhang 0db0660a95
Update README.md 2022-05-10 10:50:26 +08:00
Andy Zhang a49f5486ff
Update README.md 2022-05-10 10:49:51 +08:00
Kubernetes Prow Robot 430803f4bb
Merge pull request #333 from andyzhangx/external-1.24.0
test: run k8s 1.24 external e2e test
2022-05-08 20:23:18 -07:00
andyzhangx a3bdf03e0c test: skip one external e2e test 2022-05-07 14:58:25 +00:00
andyzhangx 7006f52e94 test: run k8s 1.24 external e2e test 2022-05-07 14:12:39 +00:00
Andy Zhang 87a1ac9329
Merge pull request #331 from andyzhangx/switch-master-4.1.0
chore: switch master branch to use v4.1.0
2022-05-06 22:35:21 +08:00
andyzhangx fd47e25105 chore: switch master branch to use v4.1.0 2022-05-06 12:35:57 +00:00
Andy Zhang a8388d4265
Merge pull request #324 from andyzhangx/cut-v4.0.0
doc: cut v4.0.0 release
2022-05-06 19:47:22 +08:00
andyzhangx 3ba85dc0ce doc: use latest version for master branch 2022-05-05 12:33:19 +00:00
andyzhangx 78a6937ae2 doc: cut v4.0.0 release
fix
2022-05-05 12:33:19 +00:00
Andy Zhang 1bd5bb03b9
Merge pull request #329 from andyzhangx/chmod-logging
cleanup: refine mount logging
2022-05-05 20:33:01 +08:00
andyzhangx 56cc263e90 cleanup: refine mount logging 2022-05-05 11:44:36 +00:00
Andy Zhang 87b4d17ea8
Merge pull request #328 from andyzhangx/zero-mountpermissions
feat: skip chmod if mountPermissions is 0 after mount
2022-05-04 20:47:10 +08:00
andyzhangx 90cc83fdbd feat: skip chmod if mountPermissions is 0
fix
2022-05-04 08:53:21 +00:00
Andy Zhang c038402144
Merge pull request #323 from andyzhangx/switch-master-4.0.0
chore: switch master branch to use v4.0.0
2022-04-30 19:08:04 +08:00
andyzhangx a263c4ac0c chore: switch master branch to use v4.0.0 2022-04-30 07:45:38 +00:00
Kubernetes Prow Robot ad34dfae9a
Merge pull request #322 from humblec/upgrade
nfs: update livenessprobe and node driver registrar to latest
2022-04-30 00:35:13 -07:00
andyzhangx 665be94f93 chore: update chart file 2022-04-30 06:54:34 +00:00
Humble Chirammal 2f1e24fc62 nfs: update livenessprobe and node driver registar to latest
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-04-27 16:44:03 +05:30
Andy Zhang 8a1cb698c1
Merge pull request #318 from andyzhangx/registry.k8s.io
chore: replace k8s.gcr.io with registry.k8s.io
2022-04-26 20:45:36 +08:00
Andy Zhang a42b320c62
Merge pull request #320 from andyzhangx/CleanupMountPoint
fix: use mount.CleanupMountPoint in NodeUnpublishVolume for handling stale nfs connections during unmount process
2022-04-25 09:47:43 +08:00
andyzhangx 38b6ba2eb9 fix: use mount.CleanupMountPoint in NodeUnpublishVolume 2022-04-24 02:43:30 +00:00
Kubernetes Prow Robot 0726684605
Merge pull request #319 from nixpanic/NodeUnpublishVolume/NotFound
fix: NodeUnpublishVolume should be idempotent
2022-04-23 18:25:36 -07:00
Niels de Vos a59837abe1 fix: NodeUnpublishVolume should be idempotent
In case the NodeUnpublishVolume procedure was aborted after unmounting
the volume, a repeated call will return an error like "Volume not
mounted".

Instead of returning the error, log a message and return success to
indicate that the volume is not mounted anymore.
2022-04-23 16:48:20 +02:00
andyzhangx d5ff651e65 chore: replace k8s.gcr.io with registry.k8s.io 2022-04-23 07:31:18 +00:00
Kubernetes Prow Robot 9aeed81815
Merge pull request #316 from andyzhangx/CVE-2022-1271
fix: CVE-2022-1271 in image build
2022-04-21 02:12:58 -07:00
Andy Zhang f37e7d2d9e
Update Dockerfile
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2022-04-21 14:42:04 +08:00
andyzhangx add37497ae chore: fix comments 2022-04-20 08:33:20 +00:00
andyzhangx 2ba9ecc35e fix: CVE-2022-1271 in image build
fix
2022-04-20 08:07:03 +00:00
Kubernetes Prow Robot 700097c7e6
Merge pull request #315 from CarlJi/doc_fix
doc: align the endpoint with environment variable used below to avoid confusing
2022-04-13 23:40:47 -07:00
Kubernetes Prow Robot ccf34c63e9
Merge pull request #313 from andyzhangx/update-crypto
chore: Update golang.org/x/crypto for CVE-2022-27191
2022-04-13 10:42:46 -07:00
jichangjun da5d6be4fe doc: align the endpoint with environment variable used below to avoid confusing 2022-04-13 22:40:02 +08:00
andyzhangx 4ed0c5d644 chore: Update golang.org/x/crypto for CVE-2022-27191 2022-04-13 08:31:45 +00:00
Andy Zhang b8c60ed47b
Merge pull request #311 from andyzhangx/repo-change
chore: change MCR repo to gcr repo
2022-04-13 10:07:42 +08:00
andyzhangx 7b5b6f3449 chore: change MCR repo to gcr repo
fix

fix

update charts files
2022-04-12 08:49:14 +00:00
Andy Zhang 69353dd4e4
Merge pull request #310 from andyzhangx/enable-slow-tests
fix: disallow block volume capability
2022-04-11 10:08:41 +08:00
andyzhangx da26b07bed test: run external inline volume tests
test: enable inline volume in external e2e tests

fix inline volume tests

fix format

shared
2022-04-10 13:26:06 +00:00
andyzhangx 07735614ff test: disable one external test 2022-04-09 14:15:48 +00:00
andyzhangx 06fa7db8ff test: switch to v1.23.5 external tests 2022-04-09 13:11:26 +00:00
andyzhangx dd2a7132b6 fix: disallow block volume capability 2022-04-09 11:32:50 +00:00
andyzhangx 60cf03bdfb test: fix external test config 2022-04-09 07:08:29 +00:00
andyzhangx 4ecb457aa6 test: enable external slow tests 2022-04-09 03:48:03 +00:00
Kubernetes Prow Robot 2a27175b55
Merge pull request #309 from andyzhangx/fix-golinter
test: fix golinter error
2022-04-05 14:41:24 -07:00
Andy Zhang b061320f85
Merge pull request #307 from pohly/prow-update-master
master: update release-tools
2022-04-05 14:36:16 +08:00
andyzhangx 97d0e7ef58 test: fix golinter error 2022-04-05 03:16:11 +00:00
Andy Zhang f5e3aca3fe
Merge pull request #308 from andyzhangx/fix-golint
test: fix golint error
2022-04-04 21:39:36 +08:00
andyzhangx 6890b3d99b test: fix golint error
test: test with golinter v1.44

fix

fix

fix

use reviewdog/action-golangci-lint

test: run golint on 1.17

fix
2022-04-04 12:48:47 +00:00
Andy Zhang 39ece506bd
Merge pull request #306 from andyzhangx/refine-pv-doc
doc: refine PV doc
2022-04-04 20:47:04 +08:00
Patrick Ohly 0be0d534b5 Merge commit 'f1f919d99ef2190a37b0d729de1928f19c95998b' into prow-update-master 2022-04-04 12:36:00 +02:00
Patrick Ohly d556966349 Squashed 'release-tools/' changes from 335339f0..37d11049
https://github.com/kubernetes-csi/csi-release-tools/commit/37d11049 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/191 from pohly/go-1.18
https://github.com/kubernetes-csi/csi-release-tools/commit/db917f5c update to Go 1.18

git-subtree-dir: release-tools
git-subtree-split: 37d1104926b30aa0544abb5a16c980ba82aaa585
2022-04-04 12:35:57 +02:00
andyzhangx e78cbedfa6 doc: refine PV doc 2022-04-03 03:10:43 +00:00
Andy Zhang 7d468729b9
Merge pull request #305 from andyzhangx/CVE-2018-25032
fix: CVE-2018-25032 in image build
2022-04-03 11:02:32 +08:00
andyzhangx 7b8bdfc5f8 test: add codeql-analysis github action 2022-04-02 06:27:47 +00:00
andyzhangx c93cf2a3bb fix: CVE-2018-25032 in image build 2022-04-02 04:42:14 +00:00
Andy Zhang b3a2b6d5e8
Update README.md 2022-03-30 21:41:41 +08:00
Andy Zhang 67f99e1e2c
Merge pull request #302 from andyzhangx/CVE-2021
fix: CVE issues in image build
2022-03-29 22:35:57 +08:00
andyzhangx 6d16ea6262 fix: CVE issues in image build 2022-03-27 09:12:15 +00:00
Kubernetes Prow Robot 9cbb29dc56
Merge pull request #301 from shiftstack/bump_prometheus_client
Address CVE-2022-21698
2022-03-27 01:47:21 -07:00
Kubernetes Prow Robot 0a08bf7c37
Merge pull request #299 from andyzhangx/fix-leader-election-namespace
fix: leader-election namespace issue
2022-03-24 10:38:42 -07:00
Pierre Prinetti b8cf9c528f
fix: Address CVE-2022-21698
Upgrade the Prometheus client to v1.11.1.

This commit is the result of running:

```
go get github.com/prometheus/client_golang@v1.11.1 \
	&& go mod tidy && go mod vendor
```

See https://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p

**What this PR does / why we need it**:
Upgrades `github.com/prometheus/client_golang` to v1.11.1, where the vulnerability has been fixed.
2022-03-24 17:01:33 +01:00
andyzhangx 56cea2ab16 fix: leader-election namespace issue 2022-03-24 11:19:10 +00:00
Andy Zhang d989685753
Merge pull request #298 from andyzhangx/fix-cloud-build
fix: post-csi-driver-nfs-push-images failure
2022-03-24 14:59:16 +08:00
andyzhangx b2ac55c19b fix: post-csi-driver-nfs-push-images failure 2022-03-23 12:46:50 +00:00
Andy Zhang 7346ad8542
Merge pull request #297 from andyzhangx/fix-push-images
chore: fix pushing image pipeline broken
2022-03-22 21:43:04 +08:00
andyzhangx af4048f386 chore: fix pushing image pipeline broken 2022-03-22 12:59:23 +00:00
Andy Zhang 1177e9be8a
Merge pull request #295 from andyzhangx/nconnect
doc: add nconnect mount option in nfs example
2022-03-19 11:23:27 +08:00
andyzhangx 9b0aa0e203 doc: add nconnect mount option in nfs example 2022-03-18 07:39:44 +00:00
Andy Zhang 35c7f09f1c
Merge pull request #294 from andyzhangx/CVE-2022-0778
fix: CVE-2022-0778 in image build
2022-03-16 16:13:43 +08:00
andyzhangx ddf22a4242 fix: CVE-2022-0778 in image build 2022-03-16 07:31:15 +00:00
Andy Zhang 8b53ffdbaa
Merge pull request #292 from andyzhangx/mountPermissions
feat: add mountPermissions parameter in storage class
2022-03-16 15:30:21 +08:00
andyzhangx 3c258fee98 test: add unit test 2022-03-05 13:41:22 +00:00
andyzhangx 14275e0be0 feat: add mountPermissions parameter in storage class 2022-03-05 13:23:45 +00:00
Andy Zhang 74791bc947
Update install-csi-driver-master.md 2022-03-02 17:29:23 +08:00
Kubernetes Prow Robot a88b659dec
Merge pull request #291 from andyzhangx/dnsPolicy
feat: change dnsPolicy to Default and add dnsPolicy setting in chart
2022-02-28 13:25:46 -08:00
andyzhangx 78263c7999 feat: change dnsPolicy to Default and add dnsPolicy setting in chart
fix
2022-02-27 13:51:33 +00:00
Andy Zhang 13a7de6b19
Merge pull request #290 from andyzhangx/ppc64le
feat: add ppc64le arch support
2022-02-27 20:25:11 +08:00
andyzhangx 782f1c1d4b feat: add ppc64le arch support 2022-02-27 02:41:52 +00:00
Kubernetes Prow Robot 238f543f10
Merge pull request #286 from pohly/prow-update-master
master: update release-tools
2022-02-16 21:31:37 -08:00
Patrick Ohly 2d969fc0d0 Merge commit '565414e4454b8375345016d4d20254e8d7cb5cba' into prow-update-master 2022-02-16 17:07:01 +01:00
Patrick Ohly 1f7f52e235 Squashed 'release-tools/' changes from 31aa44d1..335339f0
https://github.com/kubernetes-csi/csi-release-tools/commit/335339f0 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/187 from mauriciopoppe/remove-eol-windows-versions
https://github.com/kubernetes-csi/csi-release-tools/commit/890b87a2 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/188 from pwschuurman/update-release-notes-docs
https://github.com/kubernetes-csi/csi-release-tools/commit/274bc9ba Update Sidecar Release Process documentation to reference latest syntax for release-notes tool
https://github.com/kubernetes-csi/csi-release-tools/commit/87b6c372 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/185 from Garima-Negi/fix-OWNERS-files
https://github.com/kubernetes-csi/csi-release-tools/commit/f1de2c66 Fix OWNERS file - squashed commits
https://github.com/kubernetes-csi/csi-release-tools/commit/59ae38b7 Remove EOL windows versions from BUILD_PLATFORMS
https://github.com/kubernetes-csi/csi-release-tools/commit/5d664712 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/186 from humblec/sp
https://github.com/kubernetes-csi/csi-release-tools/commit/d066f1ba Correct prow.sh typo and make codespell linter pass
https://github.com/kubernetes-csi/csi-release-tools/commit/762e22d0 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/184 from pohly/image-publishing-troubleshooting
https://github.com/kubernetes-csi/csi-release-tools/commit/81e26c3f SIDECAR_RELEASE_PROCESS.md: add troubleshooting for image publishing

git-subtree-dir: release-tools
git-subtree-split: 335339f059da0b8b1947794a8c75d9e5b973cb79
2022-02-16 17:06:44 +01:00
Andy Zhang f48c0684a8
Merge pull request #285 from andyzhangx/codespell
test: add codespell shellcheck github actions
2022-02-15 17:17:09 +08:00
Javier Perez Rubio 0164e0b484
Add optional extra labels to k8s resources (#284)
* Enable the possiblity to optionally add extra labels to k8s resources

* Package lastest helm chart with extra labels changes

* Address review comments

- Rename extraLabels to customLabels
- remove enabled field
- repackage helm chart
2022-02-15 13:45:38 +08:00
Andy Zhang 7388834e52
Update README.md 2022-02-14 22:01:54 +08:00
andyzhangx 143e068b9a chore: fix shellcheck issues 2022-02-12 05:16:16 +00:00
andyzhangx 09e579235e doc: fix code spelling issues 2022-02-12 05:06:11 +00:00
andyzhangx 013e1d9279 test: add codespell shellcheck github actions 2022-02-12 05:03:10 +00:00
Kubernetes Prow Robot 209c441725
Merge pull request #282 from andyzhangx/upgrade-k8s-lib
chore: upgrade to k8s v1.23.3 lib
2022-02-08 15:00:35 -08:00
andyzhangx 0768b140af cleanup: remove snapshot dependency 2022-02-06 13:51:39 +00:00
andyzhangx fa463459a5 chore: upgrade to k8s v1.23.3 lib 2022-02-06 13:43:30 +00:00
Kubernetes Prow Robot 7329d6238d
Merge pull request #279 from neoaggelos/feat/kubeletDir
feat: add kubeletDir in chart config
2022-01-29 00:06:02 -08:00
Angelos Kolaitis f7df83d902
feat: add kubeletDir in chart config 2022-01-29 09:32:39 +02:00
Andy Zhang e2bc26bee7
Merge pull request #281 from andyzhangx/replica-one
chore: set replica of controller as 1 by default
2022-01-29 15:27:03 +08:00
andyzhangx 695f8c8204 chore: set replica of controller as 1 by default 2022-01-27 11:21:06 +00:00
Andy Zhang 56f1dfc8bf
Merge pull request #276 from andyzhangx/remove-mount-options-in-example
doc: comment mount-options in example
2022-01-27 11:13:37 +08:00
andyzhangx a8d789981a doc: remove mount-options in example
revert
2022-01-26 08:33:44 +00:00
Andy Zhang f9e5ae6ebf
Merge pull request #273 from andyzhangx/remove-unnecessary-cve-packages
cleanup: remove unnecessary CVE packages
2022-01-26 14:52:05 +08:00
andyzhangx deecdc2d15 cleanup: remove unnecessary CVE packages 2022-01-25 13:47:21 +00:00
Kubernetes Prow Robot 6c3baa7ea8
Merge pull request #272 from humblec/cve
update base image version of plugin binary to fix CVEs
2022-01-25 04:16:31 -08:00
Humble Chirammal 0988133516 update base image version of plugin binary to fix CVEs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-25 16:44:26 +05:30
Andy Zhang 76966d0329
Merge pull request #271 from andyzhangx/upgrade-csi-provisioner-v3.1.0
feat: upgrade to csi-provisioner v3.1.0
2022-01-25 14:53:28 +08:00
andyzhangx f0b51f9f06 feat: upgrade to csi-provisioner v3.1.0
fix lint
2022-01-21 14:16:51 +00:00
Andy Zhang 29f99a15d3
Merge pull request #270 from andyzhangx/switch-master-3.2.0
chore: switch master branch to use v3.2.0
2022-01-16 10:54:13 +08:00
andyzhangx b1b987e0d6 chore: switch master branch to use v3.2.0 2022-01-16 02:03:43 +00:00
Andy Zhang 1d6d82f921
Merge pull request #269 from andyzhangx/cut-v3.1.0
doc: cut v3.1.0 release
2022-01-16 09:46:54 +08:00
andyzhangx 67aa36446f doc: use latest version for master branch 2022-01-15 13:56:49 +00:00
andyzhangx 79d4b0eb1c doc: cut v3.1.0 release 2022-01-15 13:56:14 +00:00
Kubernetes Prow Robot d26df55d05
Merge pull request #268 from chrishenzie/prow-update-master
master: update release-tools
2022-01-13 17:20:28 -08:00
Chris Henzie f125ccbd13 Merge commit '745b54f17fa36f12680ee35b79a5ad2a12b2b86a' into prow-update-master 2022-01-13 15:06:05 -08:00
Chris Henzie 9b0e228be5 Squashed 'release-tools/' changes from a6a1a797..31aa44d1
https://github.com/kubernetes-csi/csi-release-tools/commit/31aa44d1 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/182 from chrishenzie/csi-sanity-version
https://github.com/kubernetes-csi/csi-release-tools/commit/f49e141c Update csi-sanity test suite to v4.3.0
https://github.com/kubernetes-csi/csi-release-tools/commit/d9815c28 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/181 from mauriciopoppe/armv7-support
https://github.com/kubernetes-csi/csi-release-tools/commit/05c18012 Add support to build arm/v7 images
https://github.com/kubernetes-csi/csi-release-tools/commit/4aedf357 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/178 from xing-yang/timeout
https://github.com/kubernetes-csi/csi-release-tools/commit/2b9897eb Increase build timeout
https://github.com/kubernetes-csi/csi-release-tools/commit/51d37029 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/177 from mauriciopoppe/kind-image-1.23
https://github.com/kubernetes-csi/csi-release-tools/commit/a30efeac Add kind image for 1.23

git-subtree-dir: release-tools
git-subtree-split: 31aa44d1deef0a5055e40dad9ac7f6e8d410b7ef
2022-01-13 15:05:48 -08:00
Andy Zhang fb28204a23
Merge pull request #266 from andyzhangx/inline-volume
feat: add inline volume support
2022-01-13 10:09:59 +08:00
andyzhangx e86dc68c2a feat: add mountOptions parameter for inline volume
fix test failure
2022-01-11 13:54:21 +00:00
Andy Zhang ae37851228
Merge pull request #267 from andyzhangx/ValidateVolumeCapabilities-fix
fix: ValidateVolumeCapabilities
2022-01-08 09:43:34 +08:00
andyzhangx 9b3e1cd174 fix: ValidateVolumeCapabilities 2022-01-07 03:57:31 +00:00
andyzhangx 60285578cf feat: add inline volume support
fix yaml

refine tests

fix example

fix test
2022-01-06 11:34:56 +00:00
Andy Zhang f9faadf9c2
Merge pull request #265 from andyzhangx/change-volumeid-format
feat: change volume id format
2022-01-06 12:54:20 +08:00
andyzhangx e03c3b833b feat: change volume id format
test: fix Windows test failure

fix windows test
2022-01-05 12:24:58 +00:00
Andy Zhang 5ae2584cd7
Merge pull request #263 from andyzhangx/workingMountDir
feat: add workingMountDir in chart config
2022-01-05 16:06:46 +08:00
andyzhangx 405a69cf24 feat: add workingMountDir in chart config
fix tests

sudo

fix

test: fix test failure

fix test

install go 1.17

fix ut

fix test

fix test

fix test

fix tests

fix workingMountDir
2022-01-04 13:43:06 +00:00
Andy Zhang 5423797603
Update driver-parameters.md 2022-01-04 21:34:07 +08:00
Andy Zhang 49a763b68b
Merge pull request #264 from andyzhangx/mountoptions-doc
doc: update mountOptions for DeleteVolume doc
2022-01-04 11:43:50 +08:00
andyzhangx b173d49dca doc: update mountOptions for DeleteVolume doc 2022-01-04 02:25:29 +00:00
Andy Zhang 2c5cc72296
Update README.md 2022-01-03 15:31:58 +08:00
Andy Zhang 3b85b325a0
Merge pull request #262 from andyzhangx/deletevolume-mountoptions
feat: support mountOptions in DeleteVolume
2022-01-03 10:50:00 +08:00
andyzhangx 498e837370 test: add e2e test for mountOptions support in DeleteVolume 2022-01-03 02:07:02 +00:00
andyzhangx d0ea11dac3 feat: support mountOptions in DeleteVolume
chore: provider secrets get permission

add logging
2022-01-03 02:07:00 +00:00
Andy Zhang fbd2a689a4
Merge pull request #261 from andyzhangx/k8s-1.23-lib
chore: upgrade to k8s 1.23 lib
2022-01-02 11:30:25 +08:00
andyzhangx aec7237c8d test: add more golint checks 2022-01-01 03:48:01 +00:00
andyzhangx 9cf4719a97 chore: upgrade to k8s 1.23 lib 2021-12-31 07:40:41 +00:00
Andy Zhang d6c19e714a
Merge pull request #259 from andyzhangx/remove-cpu-limits2
cleanup: remove cpu limits
2021-12-27 15:51:57 +08:00
andyzhangx df5fefd8d6 cleanup: remove cpu limits 2021-12-27 03:38:01 +00:00
Andy Zhang dfd758a18f
Merge pull request #258 from andyzhangx/CVE-2021-38561
fix: CVE-2021-38561 with golang lib
2021-12-23 18:03:26 +08:00
andyzhangx e34d2b0af0 fix: CVE-2021-38561 with golang lib 2021-12-21 08:31:04 +00:00
Andy Zhang 532b0a9435
Merge pull request #256 from andyzhangx/libgmp10
fix: CVE-2021-43618 in Ubuntu image
2021-12-21 16:27:51 +08:00
andyzhangx 0e3ede5a21 feat: add node.mountPermissions in chart
fix controller

update chart

fix chart

update chart

update chart

fix mountPermissions
2021-12-20 08:01:06 +00:00
andyzhangx 53c3a3c970 fix: CVE-2021-43618 in Ubuntu image
fix chart
2021-12-19 07:52:28 +00:00
Andy Zhang 8f9fd3833a
Update README.md 2021-12-15 22:02:23 +08:00
Kubernetes Prow Robot 32290410ce
Merge pull request #255 from ShirleyDing/fix-docs
doc: fix links of docs
2021-12-08 01:37:46 -08:00
Shirley 0da4f13edc fix links of install-csi-driver 2021-12-08 14:45:36 +08:00
Kubernetes Prow Robot 77e220d007
Merge pull request #254 from andyzhangx/fix-version
fix: driver version print in logging
2021-12-07 06:54:02 -08:00
Andy Zhang f92d847a01
Update README.md 2021-12-07 16:15:42 +08:00
andyzhangx aab43558bc fix: driver version print in logging 2021-12-07 07:44:12 +00:00
Andy Zhang 9ab192ba31
Merge pull request #253 from andyzhangx/nfsv3
fix: mount.nfs: Protocol not supported on NFSv3
2021-12-04 15:15:48 +08:00
andyzhangx c2235a8be6 feat: support NFSv3 protocol 2021-12-03 15:39:32 +00:00
Andy Zhang d4488a02ad
Merge pull request #252 from andyzhangx/fix-v3.0.0-chart
fix: v3.0.0 chart
2021-12-03 23:38:06 +08:00
andyzhangx 32bfba28ed fix: v3.0.0 chart 2021-12-03 09:33:09 +00:00
Andy Zhang f3f2bac3bb
Update release-image.sh 2021-11-30 16:05:57 +08:00
Andy Zhang b7b51e17a4
Merge pull request #250 from andyzhangx/switch-master-3.1.0
chore: switch master branch to use v3.1.0
2021-11-30 11:36:49 +08:00
andyzhangx b2e88548a1 chore: switch master branch to use v3.1.0 2021-11-30 03:07:05 +00:00
Andy Zhang 0e64321a32
Update README.md 2021-11-30 10:48:30 +08:00
Kubernetes Prow Robot 5f399f2074
Merge pull request #249 from andyzhangx/cut-v3.0.0-2
doc: cut v3.0.0 release
2021-11-29 14:51:20 -08:00
andyzhangx 37f9aca002 doc: use latest version for master branch 2021-11-29 05:51:17 +00:00
andyzhangx 9d6279ab96 doc: cut v3.0.0 release 2021-11-29 05:50:31 +00:00
Andy Zhang 6b243d093e
Merge pull request #248 from andyzhangx/readme-update
doc: update README
2021-11-29 13:26:03 +08:00
andyzhangx 76ad4b6f22 doc: update README 2021-11-28 13:41:59 +00:00
Andy Zhang 9134dcca07
Merge pull request #230 from andyzhangx/vulnerability-fix
fix: vulnerability issue in docker image
2021-11-28 16:14:44 +08:00
andyzhangx 38ff2970b1 fix: install updated packages to fix CVE issues 2021-11-27 14:14:07 +00:00
andyzhangx ea9e9e65aa fix: vulnerability issue in docker image
fix failure

fxi arch

fix image name

fix failure

test: update trivy test

fix test

install go  1.16

go

fix failure

fix failure
2021-11-27 13:39:27 +00:00
Andy Zhang be980cc87f
Merge pull request #247 from andyzhangx/increase-cpu-limits
feat: increase sidecar container cpu limits
2021-11-27 17:35:30 +08:00
andyzhangx 0908ad4f5d feat: incrase sidecar container cpu limits 2021-11-24 15:07:51 +00:00
Kubernetes Prow Robot ab0d606cfa
Merge pull request #245 from pohly/prow-update-master
master: update release-tools
2021-11-16 09:07:29 -08:00
Patrick Ohly 0febe7155a Merge commit '59d860c92f17e30d2a395b5492e41607b8dbc3f9' into prow-update-master 2021-11-16 16:57:25 +01:00
Patrick Ohly d75ef7010a Squashed 'release-tools/' changes from 5b9a1e06..a6a1a797
https://github.com/kubernetes-csi/csi-release-tools/commit/a6a1a797 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/176 from pohly/go-1.17.3
https://github.com/kubernetes-csi/csi-release-tools/commit/0a2cf636 prow.sh: bump Go to 1.17.3
https://github.com/kubernetes-csi/csi-release-tools/commit/fc29fdde Merge https://github.com/kubernetes-csi/csi-release-tools/pull/141 from pohly/prune-replace-optional
https://github.com/kubernetes-csi/csi-release-tools/commit/b46691a4 go-get-kubernetes.sh: make replace statement pruning optional

git-subtree-dir: release-tools
git-subtree-split: a6a1a7979bf3ebc2bb10d0e33dd11ab281d6d39e
2021-11-16 16:57:16 +01:00
Andy Zhang 5642e44244
Merge pull request #241 from shiftstack/CVE-2021-3121
Bump k8s to v.0.22.3
2021-11-16 11:54:59 +08:00
Pierre Prinetti 6abb111ac6
Bump k8s to v.0.22.3
Fully address CVE-2021-3121 in the process.
2021-11-15 14:59:23 +01:00
Kubernetes Prow Robot da422f94fe
Merge pull request #244 from shiftstack/windows_go_version
Windows go version
2021-11-15 05:42:48 -08:00
Pierre Prinetti 339d4d25ae
actions: Print go version
In order to rapidly debug test issues, issue `go version` prior to
running any test.
2021-11-15 14:01:28 +01:00
Pierre Prinetti 0623e9e6e9
actions: Fix Windows Go version
Prior to this patch, the Go version for the Windows tests in Github
resolved to `1.15.15`[1].

With this patch, the Go version for the Windows tests is fixed to
actually resolve to the latest version (^1.16), consistent to the other
platforms.

This patch also bumps `actions/setup-go`[2] to the latest version,
consistent with the other platforms.

[1]: https://github.com/kubernetes-csi/csi-driver-nfs/runs/4211323920?check_suite_focus=true
[2]: https://github.com/actions/setup-go
2021-11-15 14:01:27 +01:00
Andy Zhang 008c21bad4
Merge pull request #243 from andyzhangx/sidecar-limits
feat: add sidecar container cpu,memory limits
2021-11-15 20:12:02 +08:00
andyzhangx 3f9a72312c feat: add sidecar container cpu,memory limits 2021-11-12 09:08:13 +00:00
Kubernetes Prow Robot 96d13a56e5
Merge pull request #240 from groggemans/fix/GH-239
fix: armv7 docker builds
2021-11-01 18:28:59 -07:00
G. Roggemans 741a706811 Fix armv7 docker builds
Moves the ARCH build argument after the first FROM so it has the proper
value. Default value is empty as required by release-tools/build.make.
(https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact)

Adds the GOARM=7 option to the armv7 GO build.
2021-11-01 13:21:12 +01:00
Kubernetes Prow Robot e9bd4d10fc
Merge pull request #237 from pohly/prow-update-master
master: update release-tools
2021-10-25 21:21:29 -07:00
Kubernetes Prow Robot 2c0449e1f5
Merge pull request #238 from antmoveh/master
Reset directory permissions
2021-10-18 00:03:49 -07:00
antmoveh ee1b589f17 reset directory permissions
update commit user


update commit user
2021-10-18 14:23:49 +08:00
Patrick Ohly 0e6435577d Merge commit 'de7541519fa16d89399fceaca3c87571e51e6479' into prow-update-master 2021-10-15 08:06:34 +02:00
Patrick Ohly 3ede6f2ff3 Squashed 'release-tools/' changes from 5489de6e..5b9a1e06
https://github.com/kubernetes-csi/csi-release-tools/commit/5b9a1e06 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/175 from jimdaga/patch-1
https://github.com/kubernetes-csi/csi-release-tools/commit/5eeb6029 images: use k8s-staging-test-infra/gcb-docker-gcloud

git-subtree-dir: release-tools
git-subtree-split: 5b9a1e06794ddb137ff7e2d565416cc6934ec380
2021-10-15 08:06:32 +02:00
Andy Zhang 85cd36ede4
Merge pull request #234 from andyzhangx/liveness-linux
feat: add registrar liveness probe
2021-10-09 20:34:25 +08:00
andyzhangx dcf1c46f8f feat: add registrar liveness probe 2021-10-09 04:08:39 +00:00
Andy Zhang 8ad6bea851
Merge pull request #233 from andyzhangx/csidriver-v1.22
fix: make CSI driver work on 1.22
2021-10-09 12:07:39 +08:00
andyzhangx e31c2c18a5 fix: make CSI driver work on 1.22 2021-10-09 02:33:19 +00:00
Andy Zhang 718eee74e1
Merge pull request #229 from andyzhangx/amrv7
feat: support armv7 image build
2021-09-23 14:51:10 +08:00
andyzhangx 510fcbb12f feat: support amrv7 image build 2021-09-22 04:05:38 +00:00
Andy Zhang 062ef6ff9e
Merge pull request #228 from andyzhangx/arm64-image-build
feat: support arm64 image build
2021-09-22 11:06:39 +08:00
andyzhangx e12fe411ae chore: export vars in Makefile 2021-09-21 13:27:23 +00:00
andyzhangx 1bcaffd3a3 chore: set registry type in e2e test
fix bash

registry

fix registry typ

fix typo

set registry
2021-09-21 13:02:17 +00:00
andyzhangx c5247b92df feat: support arm64 image build
chore: fix container build failure

revert

fix build failure
2021-09-21 04:15:31 +00:00
Andy Zhang 3235308f9b
Merge pull request #226 from andyzhangx/upgrade-csi-1.5.0
feat: ReadWriteOncePod support
2021-09-21 10:54:42 +08:00
andyzhangx 9a89d25b41 test: disable GetCapabilities test temporalily 2021-09-20 03:13:00 +00:00
andyzhangx fd5bac4692 feat: ReadWriteOncePod support
update controller cap

add node cap

fix test
2021-09-20 03:04:57 +00:00
Kubernetes Prow Robot b15e686732
Merge pull request #225 from dlwhitehurst/master
cluster misspelled
2021-09-14 17:54:41 -07:00
David L. Whitehurst 0b3a10d234
cluster misspelled 2021-09-14 16:52:45 -04:00
Kubernetes Prow Robot c9df266b89
Merge pull request #224 from mauriciopoppe/prow-update-master
master: update release-tools
2021-09-10 12:43:22 -07:00
Mauricio Poppe 86d0aa67e3 Merge commit '77ffb0c50d661ea2a20e082201024fc08b7fdf7a' into prow-update-master 2021-09-10 18:50:40 +00:00
Mauricio Poppe 61626a1ca5 Squashed 'release-tools/' changes from c0a4fb1d..5489de6e
https://github.com/kubernetes-csi/csi-release-tools/commit/5489de6e Merge https://github.com/kubernetes-csi/csi-release-tools/pull/174 from mauriciopoppe/bump-kind-version
https://github.com/kubernetes-csi/csi-release-tools/commit/0c675d4c Bump kind version to v0.11.1
https://github.com/kubernetes-csi/csi-release-tools/commit/ef69a88d Merge https://github.com/kubernetes-csi/csi-release-tools/pull/173 from nick5616/add-ws2022
https://github.com/kubernetes-csi/csi-release-tools/commit/44c710c5 added WS2022 to build platforms
https://github.com/kubernetes-csi/csi-release-tools/commit/0883be4f Merge https://github.com/kubernetes-csi/csi-release-tools/pull/171 from pohly/example-commands
https://github.com/kubernetes-csi/csi-release-tools/commit/02cda510 build.make: support binaries outside of cmd, with optional go.mod
https://github.com/kubernetes-csi/csi-release-tools/commit/65922ea2 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/170 from pohly/canary-snapshot-controller
https://github.com/kubernetes-csi/csi-release-tools/commit/c0bdfb3a prow.sh: deploy canary snapshot-controller in canary jobs
https://github.com/kubernetes-csi/csi-release-tools/commit/0438f15a Merge https://github.com/kubernetes-csi/csi-release-tools/pull/167 from c0va23/feature/release-armv7-image
https://github.com/kubernetes-csi/csi-release-tools/commit/4786f4d0 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/168 from msau42/update-release-prereq
https://github.com/kubernetes-csi/csi-release-tools/commit/6a2dc64a Remove requirement to be top-level approver. Only maintainers membership is required to do a release
https://github.com/kubernetes-csi/csi-release-tools/commit/30a4f7bb Release armv7 image
https://github.com/kubernetes-csi/csi-release-tools/commit/ac8108f1 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/165 from consideRatio/pr/update-github-links-ref-to-master-to-HEAD
https://github.com/kubernetes-csi/csi-release-tools/commit/999b483d docs: make github links reference HEAD instead of main
https://github.com/kubernetes-csi/csi-release-tools/commit/fd670693 docs: make github links reference HEAD instead of master

git-subtree-dir: release-tools
git-subtree-split: 5489de6e743cf8362e5ab8275988cc748d0758b0
2021-09-10 18:50:20 +00:00
Kubernetes Prow Robot 6ab3d8f72c
Merge pull request #223 from YuikoTakada/add_example_usage
Add usage using hack/verify-examples.sh
2021-09-07 23:03:20 -07:00
Yuiko Mouri b8145d42b5 Add usage using hack/verify-examples.sh 2021-09-08 11:56:48 +09:00
Kubernetes Prow Robot 0ddb40824b
Merge pull request #222 from andyzhangx/upgrade-provisioner-version
test: upgrade csi-provisioner to v3.0.0 in external e2e test
2021-09-06 06:36:30 -07:00
andyzhangx 46046fdab5 test: upgrade csi-provisioner to v3.0.0 in external e2e test 2021-09-06 12:49:25 +00:00
Andy Zhang d01af7ab12
Merge pull request #221 from andyzhangx/upgrade-sidecar-versions2
chore: upgrade sidecar container versions
2021-09-04 14:18:00 +08:00
andyzhangx 557c997e27 chore: upgrade sidcar container versions 2021-09-03 13:34:47 +00:00
Andy Zhang b2c694216e
Merge pull request #220 from andyzhangx/registrar-remove-probe
fix: remove kubelet-registration-probe
2021-08-18 09:14:39 +08:00
andyzhangx 6ca8f96a93 fix: remove kubelet-registration-probe 2021-08-17 14:12:59 +00:00
Kubernetes Prow Robot 98261acdcd
Merge pull request #219 from andyzhangx/driver-registrar-v2.3
chore: ugprade to driver-registrar v2.3.0
2021-08-16 14:32:22 -07:00
andyzhangx 894a110113 chore: ugprade to driver-registrar v2.3.0
fix doc
2021-08-15 07:56:37 +00:00
Andy Zhang 56c3c69169
Merge pull request #218 from andyzhangx/maxUnavailable
feat: support maxUnavailable config in helm chart
2021-08-15 15:41:26 +08:00
andyzhangx bfb5f3878a feat: support maxUnavailable config in helm chart 2021-08-13 13:01:44 +00:00
Kubernetes Prow Robot a2db59f678
Merge pull request #217 from pohly/prow-update-master
master: update release-tools
2021-08-02 04:25:22 -07:00
Andy Zhang 87668b4aa5 Update README.md 2021-08-02 11:50:57 +02:00
Andy Zhang 0423ff0f2d
Update README.md 2021-07-11 15:48:31 +08:00
Andy Zhang e62205b946
Merge pull request #216 from andyzhangx/alternative-driver-name
feat: support alternative driver name
2021-07-11 09:04:07 +08:00
Andy Zhang 11cdb63319
Update csi-debug.md 2021-07-10 23:33:30 +08:00
andyzhangx 958efd92ca feat: support alternative driver name
fix driver name
2021-07-10 12:33:55 +00:00
Kubernetes Prow Robot 43e5c57e00
Merge pull request #215 from pohly/prow-update-master
master: update release-tools
2021-07-06 05:44:18 -07:00
Patrick Ohly 11d71bcb86 Merge commit 'b553a095e7b78d77142c9922f10aa49c0cb337da' into prow-update-master 2021-07-06 09:46:54 +02:00
Patrick Ohly 68c89a87e1 Squashed 'release-tools/' changes from f3255906..c0a4fb1d
https://github.com/kubernetes-csi/csi-release-tools/commit/c0a4fb1d Merge https://github.com/kubernetes-csi/csi-release-tools/pull/164 from anubha-v-ardhan/patch-1
https://github.com/kubernetes-csi/csi-release-tools/commit/9c6a6c08 Master to main cleanup
https://github.com/kubernetes-csi/csi-release-tools/commit/682c686a Merge https://github.com/kubernetes-csi/csi-release-tools/pull/162 from pohly/pod-name-via-shell-command
https://github.com/kubernetes-csi/csi-release-tools/commit/36a29f5c Merge https://github.com/kubernetes-csi/csi-release-tools/pull/163 from pohly/remove-bazel
https://github.com/kubernetes-csi/csi-release-tools/commit/68e43ca7 prow.sh: remove Bazel build support
https://github.com/kubernetes-csi/csi-release-tools/commit/c5f59c5a prow.sh: allow shell commands in CSI_PROW_SANITY_POD
https://github.com/kubernetes-csi/csi-release-tools/commit/71c810ab Merge https://github.com/kubernetes-csi/csi-release-tools/pull/161 from pohly/mock-test-fixes
https://github.com/kubernetes-csi/csi-release-tools/commit/9e438f8e prow.sh: fix mock testing
https://github.com/kubernetes-csi/csi-release-tools/commit/d7146c79 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/160 from pohly/kind-update
https://github.com/kubernetes-csi/csi-release-tools/commit/4b6aa609 prow.sh: update to KinD v0.11.0
https://github.com/kubernetes-csi/csi-release-tools/commit/7cdc76f3 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/159 from pohly/fix-deployment-selection
https://github.com/kubernetes-csi/csi-release-tools/commit/ef8bd33b prow.sh: more flexible CSI_PROW_DEPLOYMENT, part II
https://github.com/kubernetes-csi/csi-release-tools/commit/204bc89c Merge https://github.com/kubernetes-csi/csi-release-tools/pull/158 from pohly/fix-deployment-selection
https://github.com/kubernetes-csi/csi-release-tools/commit/61538bb7 prow.sh: more flexible CSI_PROW_DEPLOYMENT
https://github.com/kubernetes-csi/csi-release-tools/commit/2b0e6db9 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/157 from humblec/csi-release
https://github.com/kubernetes-csi/csi-release-tools/commit/a2fcd6de Adding myself to csi reviewers group

git-subtree-dir: release-tools
git-subtree-split: c0a4fb1dd00b02879dbcea987e2e9524e4f5a905
2021-07-06 09:46:52 +02:00
Andy Zhang 873e95f658
Merge pull request #214 from andyzhangx/daemonset-nfs-ephemeral-example
doc: add daemonset-nfs-ephemeral.yaml example
2021-07-05 13:05:13 +08:00
andyzhangx 010cd3bd42 test: run example tests 2021-07-05 04:01:55 +00:00
andyzhangx 262d335441 doc: add daemonset-nfs-ephemeral.yaml example 2021-07-05 02:56:08 +00:00
Andy Zhang 2eb84d501e
Merge pull request #208 from andyzhangx/tolerations
feat: support customization tolerations in chart
2021-06-23 14:52:02 +08:00
andyzhangx ff2333eebb feat: support customization tolerations in chart
update deploy/csi-nfs-node.yaml
2021-06-14 13:25:44 +00:00
Andy Zhang d1737d3ea1
Update README.md 2021-06-02 14:42:51 +08:00
Andy Zhang 4d2d1194e6
Update README.md 2021-06-02 14:40:32 +08:00
Andy Zhang d03903e606
Update README.md 2021-06-01 11:45:07 +08:00
Andy Zhang 742f7a55c0
Create README.md 2021-06-01 11:44:29 +08:00
Andy Zhang d5d8a80c76
Merge pull request #206 from andyzhangx/fsgrouppolicy
feat: support fsGroupPolicy feature
2021-06-01 09:27:26 +08:00
andyzhangx 5df685273d feat: support fsGroupPolicy feature
update chart file

fix chart file

fix helm options

fix Makefile
2021-05-29 08:24:32 +00:00
Kubernetes Prow Robot 11860158c1
Merge pull request #205 from andyzhangx/externel-tests-1.21
test: run externel tests with 1.21 suites
2021-05-24 06:49:38 -07:00
andyzhangx 485a98a111 test: run externel tests with 1.21 suites 2021-05-24 04:47:52 +00:00
Andy Zhang de658be866
Merge pull request #204 from andyzhangx/external-tests-1.21
test: run external e2e test using 1.20 suites
2021-05-24 11:36:53 +08:00
Kubernetes Prow Robot 79afaa1f89
Merge pull request #197 from boddumanohar/cleanup-todo
Remove capacity setting in create Volume response
2021-05-23 20:07:38 -07:00
andyzhangx 61fca129a0 test: run external e2e test using 1.20 suites
run on 1.20

run on 1.21

run on 1.20
2021-05-24 03:04:25 +00:00
Kubernetes Prow Robot 02dc875fbb
Merge pull request #203 from pohly/prow-update-master
master: update release-tools + OWNERS
2021-05-22 20:05:37 -07:00
Patrick Ohly 5bdbb62e0f OWNERS update with aliases 2021-05-21 09:27:42 +02:00
Patrick Ohly 4e89f54f43 Merge commit 'e5ae2c1c64dcd65e24dc5811a09391ba880ee2c8' into prow-update-master 2021-05-21 09:23:52 +02:00
Patrick Ohly 69c24e1857 Squashed 'release-tools/' changes from 6616a6b5..f3255906
https://github.com/kubernetes-csi/csi-release-tools/commit/f3255906 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/149 from pohly/cluster-logs
https://github.com/kubernetes-csi/csi-release-tools/commit/4b03b308 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/155 from pohly/owners
https://github.com/kubernetes-csi/csi-release-tools/commit/a6453c86 owners: introduce aliases
https://github.com/kubernetes-csi/csi-release-tools/commit/ad83def4 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/153 from pohly/fix-image-builds
https://github.com/kubernetes-csi/csi-release-tools/commit/55617801 build.make: fix image publishng
https://github.com/kubernetes-csi/csi-release-tools/commit/29bd39b3 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/152 from pohly/bump-csi-test
https://github.com/kubernetes-csi/csi-release-tools/commit/bc427931 prow.sh: use csi-test v4.2.0
https://github.com/kubernetes-csi/csi-release-tools/commit/b546baaf Merge https://github.com/kubernetes-csi/csi-release-tools/pull/150 from mauriciopoppe/windows-multiarch-args
https://github.com/kubernetes-csi/csi-release-tools/commit/bfbb6f35 add parameter base_image and addon_image to BUILD_PARAMETERS
https://github.com/kubernetes-csi/csi-release-tools/commit/2d61d3bc Merge https://github.com/kubernetes-csi/csi-release-tools/pull/151 from humblec/cm
https://github.com/kubernetes-csi/csi-release-tools/commit/48e71f06 Replace `which` command ( non standard)  with `command -v` builtin
https://github.com/kubernetes-csi/csi-release-tools/commit/feb20e26 prow.sh: collect cluster logs
https://github.com/kubernetes-csi/csi-release-tools/commit/7b96bea3 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/148 from dobsonj/add-checkpathcmd-to-prow
https://github.com/kubernetes-csi/csi-release-tools/commit/2d2e03b7 prow.sh: enable -csi.checkpathcmd option in csi-sanity
https://github.com/kubernetes-csi/csi-release-tools/commit/09d41512 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/147 from pohly/mock-testing
https://github.com/kubernetes-csi/csi-release-tools/commit/74cfbc97 prow.sh: support mock tests
https://github.com/kubernetes-csi/csi-release-tools/commit/4a3f1103 prow.sh: remove obsolete test suppression

git-subtree-dir: release-tools
git-subtree-split: f3255906abf2e4134cb3db4ff79ddfb5ce1e91aa
2021-05-21 09:23:46 +02:00
Andy Zhang 49beca5e23
Merge pull request #202 from andyzhangx/sidecar-version-upgrade
chore: upgrade liveness probe and registrar
2021-05-20 21:36:54 +08:00
andyzhangx 92775b0d25 chore: upgrade liveness probe and registrar 2021-05-20 13:08:52 +00:00
Andy Zhang 53b8c6fe30
Merge pull request #201 from andyzhangx/remove-lock
fix: remove unnecessary lock
2021-05-19 22:27:01 +08:00
andyzhangx f5abcf764a fix: remove unnecessary lock
fix golint
2021-05-19 13:33:39 +00:00
Andy Zhang 17fb13f2f7
Merge pull request #198 from andyzhangx/update-base-image
chore: upgrade base image to fix CVE issue
2021-05-12 19:12:05 +08:00
andyzhangx 83ad09b7aa chore: upgrade base image to fix CVE issue 2021-05-12 10:45:03 +00:00
Kubernetes Prow Robot 3e8f4c34eb
Merge pull request #196 from pohly/prow-update-master
master: update release-tools
2021-05-06 06:55:16 -07:00
Manohar Reddy 98ec1a8aaf Remove capacity setting in create Volume response 2021-05-05 15:42:48 +00:00
Patrick Ohly 07c2b4ba37 Merge commit '74479a1485e1da5208eff6681d2488742ff838e5' into prow-update-master 2021-05-05 14:11:06 +02:00
Patrick Ohly eb1bf794e9 Squashed 'release-tools/' changes from a1e11275..6616a6b5
https://github.com/kubernetes-csi/csi-release-tools/commit/6616a6b5 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/146 from pohly/kubernetes-1.21
https://github.com/kubernetes-csi/csi-release-tools/commit/510fb0f9 prow.sh: support Kubernetes 1.21
https://github.com/kubernetes-csi/csi-release-tools/commit/c63c61b3 prow.sh: add CSI_PROW_DEPLOYMENT_SUFFIX
https://github.com/kubernetes-csi/csi-release-tools/commit/51ac11c3 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/144 from pohly/pull-jobs
https://github.com/kubernetes-csi/csi-release-tools/commit/dd54c926 pull-test.sh: test importing csi-release-tools into other repo
https://github.com/kubernetes-csi/csi-release-tools/commit/7d2643a5 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/143 from pohly/path-setup
https://github.com/kubernetes-csi/csi-release-tools/commit/6880b0c8 prow.sh: avoid creating paths unless really running tests
https://github.com/kubernetes-csi/csi-release-tools/commit/bc0504ad Merge https://github.com/kubernetes-csi/csi-release-tools/pull/140 from jsafrane/remove-unused-k8s-libs
https://github.com/kubernetes-csi/csi-release-tools/commit/5b1de1ad go-get-kubernetes.sh: remove unused k8s libs
https://github.com/kubernetes-csi/csi-release-tools/commit/49b42693 Merge https://github.com/kubernetes-csi/csi-release-tools/pull/120 from pohly/add-kubernetes-release
https://github.com/kubernetes-csi/csi-release-tools/commit/f7e7ee49 docs: steps for adding testing against new Kubernetes release

git-subtree-dir: release-tools
git-subtree-split: 6616a6b5294b6df39cfce37f4fce7cdce0a77583
2021-05-05 14:11:03 +02:00
Kubernetes Prow Robot fccb61c1be
Merge pull request #194 from boddumanohar/liveness-probe-port
add a new helm parameter for livenessProbe health port
2021-05-03 06:46:03 -07:00
Manohar Reddy fa61d6ee15 add a new helm parameter for livenessProbe health port 2021-05-03 06:18:32 +00:00
Kubernetes Prow Robot 670205f274
Merge pull request #193 from andyzhangx/remove-podInfoOnMount
fix: remove unnecessary podInfoOnMount
2021-04-30 10:17:58 -07:00
andyzhangx 2b35ab6612 fix: remove unnecessary podInfoOnMount 2021-04-30 14:18:56 +00:00
Kubernetes Prow Robot 00095be916
Merge pull request #190 from boddumanohar/external-e2e
Add K8s external storage E2E tests
2021-04-29 02:56:50 -07:00
Manohar Reddy 69df30cdc9 add setup for k8s external e2e tests 2021-04-29 08:53:19 +00:00
Kubernetes Prow Robot e6ba071865
Merge pull request #189 from mdbooth/CVE-2021-3121
Bump K8s to v0.21.0 to (mostly) address CVE-2021-3121
2021-04-27 05:33:38 -07:00
Matthew Booth f60438f5bf Bump k8s to v0.21.0 2021-04-26 09:48:33 +01:00
Matthew Booth 320f7de752 go.mod: Move replaces into a common block 2021-04-26 09:45:42 +01:00
Kubernetes Prow Robot 437f3c63fb
Merge pull request #192 from boddumanohar/issue-165
add image pull secrets in helm chart
2021-04-25 23:59:01 -07:00
Manohar Reddy 94b3dc2776 Add README.md for the new helm parameter 2021-04-26 06:30:43 +00:00
Manohar Reddy d002b37180 add image pull secrets in helm chart 2021-04-25 15:13:03 +00:00
Andy Zhang c4e0424655
Merge pull request #191 from andyzhangx/mount-utils
chore: switch to use k8s.io/mount-utils
2021-04-25 10:59:47 +08:00
andyzhangx e0d1832df3 chore: switch to use k8s.io/mount-utils 2021-04-24 01:44:34 +00:00
Kubernetes Prow Robot 9811fe4c6f
Merge pull request #186 from juergenthomann/share_folders
Allow shares that are not at the root
2021-04-13 19:22:42 -07:00
Jürgen Thomann 6867a95639 Allow shares that are not at the root 2021-04-13 20:53:58 +02:00
Andy Zhang 24f5240726
Update csi-dev.md 2021-04-12 11:36:26 +08:00
Andy Zhang 350f357bea
Merge pull request #185 from andyzhangx/upgrade-node-driver-registrar
feat: upgrade node driver registrar to v2.1.0
2021-04-12 09:23:59 +08:00
andyzhangx 9a2fa8861b feat: upgrade node driver registrar to v2.1.0 2021-04-11 14:10:49 +00:00
Kubernetes Prow Robot b53f765682
Merge pull request #182 from boddumanohar/control-plane
add a new node role for control plane
2021-04-07 23:58:56 -07:00
Kubernetes Prow Robot f8a385a444
Merge pull request #181 from boddumanohar/e2e-subpath
add subPath e2e test
2021-04-07 23:15:42 -07:00
Manohar Reddy 3a9b724316 add subPath e2e test 2021-04-07 13:12:35 +00:00
Manohar Reddy b3dd1b11da add a new node role for control plane 2021-04-07 12:28:08 +00:00
Kubernetes Prow Robot 0e56559fce
Merge pull request #180 from pohly/prow-update-master
master: update release-tools
2021-04-06 18:48:40 -07:00
Patrick Ohly eb7990ca01 Merge commit '0fd83724fd82e082940e6663c01c0373750423ec' into prow-update-master 2021-03-24 13:47:11 +01:00
Patrick Ohly 0fd83724fd Squashed 'release-tools/' changes from 95eac33..a1e1127
a1e1127 Merge pull request #139 from pohly/kind-for-kubernetes-latest
1c0fb09 prow.sh: use KinD main for latest Kubernetes
1d77cfc Merge pull request #138 from pohly/kind-update-0.10
bff2fb7 prow.sh: KinD 0.10.0

git-subtree-dir: release-tools
git-subtree-split: a1e11275b5a4febd6ad21beeac730e22c579825b
2021-03-24 13:47:09 +01:00
Kubernetes Prow Robot 09d135dbcc
Merge pull request #177 from pohly/prow-update-master
master: update release-tools + dependencies
2021-03-18 06:37:19 -07:00
Patrick Ohly 73eb5ef4eb Squashed 'release-tools/' changes from 1748b16..95eac33
95eac33 Merge pull request #137 from pohly/fix-go-version-check
437e431 verify-go-version.sh: fix check after removal of travis.yml

git-subtree-dir: release-tools
git-subtree-split: 95eac33629ea9c586c4efcb7ad875191162464b2
2021-03-18 11:05:14 +01:00
Patrick Ohly ae44e5a986 Merge commit '73eb5ef4eb78c4dccd5d226cef5cb477afaedb27' into prow-update-master 2021-03-18 11:05:14 +01:00
Patrick Ohly 625579854f Merge commit '1edcaf30c25465f8e2b68f561d71ae3c69d76150' into prow-update-master 2021-03-18 09:00:11 +01:00
Patrick Ohly 1edcaf30c2 Squashed 'release-tools/' changes from df76aba..1748b16
1748b16 Merge pull request #136 from pohly/go-1.16
ec844ea remove travis.yml, Go 1.16

git-subtree-dir: release-tools
git-subtree-split: 1748b16b488381c34a86ddbee110e9ed523bcb20
2021-03-18 09:00:10 +01:00
Andy Zhang c1bf3bbcb8
Merge pull request #159 from andyzhangx/set-big-limit
fix: set big limit for nfs container
2021-03-17 14:10:54 +08:00
andyzhangx c8b6bbdddb fix: increase memory limit for csi-provisioner 2021-03-16 09:39:28 +00:00
Andy Zhang 7e54331948
Merge pull request #175 from andyzhangx/liveness-probe
feat: add liveness probe healthz port
2021-03-13 21:52:24 +08:00
andyzhangx f17df6e768 feat: add liveness probe helthz port 2021-03-13 12:15:49 +00:00
Andy Zhang 36875348e2
Update driver-parameters.md 2021-03-11 21:49:51 +08:00
Andy Zhang f022408c4c
Merge pull request #172 from andyzhangx/increase-memory-limit
fix: increase memory limit of csi-provisioner
2021-03-11 15:55:32 +08:00
andyzhangx 77fb868151 feat: upgrade csi-provisioner to v2.1.0 2021-03-10 13:09:33 +00:00
andyzhangx 8a5291d9fd chore: increase memory limit of csi-provisioner 2021-03-10 13:06:38 +00:00
Andy Zhang d087db1b43
Merge pull request #170 from andyzhangx/fix-go-mod
test: fix go mod issue with go1.16
2021-03-09 21:32:20 +08:00
andyzhangx 7ff2fb8510 test: fix go mod issue with go1.16 2021-03-07 12:09:11 +00:00
Andy Zhang b35fa7571d
Merge pull request #168 from andyzhangx/controller-hostnetwork
fix: add hostNetwork in controller
2021-02-23 15:27:39 +08:00
andyzhangx 425d715bae fix: add hostNetwork in controller 2021-02-23 06:42:49 +00:00
Andy Zhang c4765d1faa
Merge pull request #166 from andyzhangx/add-arch
feat: add ARCH in Dockerfile
2021-02-22 21:36:04 +08:00
andyzhangx b894ed8a7e feat: add ARCH in Dockerfile
set default ARG value
2021-02-22 13:11:21 +00:00
Andy Zhang 0c89c6348b
Merge pull request #167 from andyzhangx/update-release-tools
Update release tools
2021-02-22 20:55:14 +08:00
andyzhangx 49247ccebe Squashed 'release-tools/' changes from 7bc70e5..df76aba
df76aba Merge pull request #134 from andyzhangx/add-build-arg
e314a56 add build-arg ARCH for building multi-arch images, e.g. ARG ARCH FROM k8s.gcr.io/build-image/debian-base-${ARCH}:v2.1.3

git-subtree-dir: release-tools
git-subtree-split: df76aba89e193d53e2afef40d7cf8f649a408987
2021-02-22 12:19:51 +00:00
andyzhangx 967f714e01 Merge commit '49247ccebec81a47ea0daa28f2e222acc3cae6de' 2021-02-22 12:19:51 +00:00
Andy Zhang ac023bf4af
Merge pull request #164 from andyzhangx/change-base-image
fix: change base image to debian
2021-02-21 08:05:43 +08:00
andyzhangx 525c6bcad6 chore: change base image to debian
add mount
2021-02-20 14:14:48 +00:00
Andy Zhang b7ef7d00b0
Merge pull request #163 from andyzhangx/helm-index-verify
test: add helm chart index verification
2021-02-20 09:51:42 +08:00
andyzhangx 24c5a89a96 test: add helm chart index verification 2021-02-19 14:29:47 +00:00
andyzhangx 5758c61fa5 chore: set csi-provisioner memory limt as 100Mi 2021-02-19 14:29:29 +00:00
Kubernetes Prow Robot 22f4c8f701
Merge pull request #161 from songjiaxun/disable_openapi_validation
doc: update supported k8s version
2021-02-17 05:41:06 -08:00
Jiaxun Song 1097b251bd doc: update supported k8s version 2021-02-17 01:00:33 -08:00
Kubernetes Prow Robot fd0ada067a
Merge pull request #160 from songjiaxun/add_lock
feat: add locks for nodeserver publish/unpublish operations
2021-02-16 18:05:06 -08:00
Jiaxun Song dd1c04a88e feat: add locks for nodeserver publish/unpublish operations 2021-02-16 11:46:10 -08:00
Andy Zhang 56ff695fd7
Merge pull request #157 from andyzhangx/loglevel
set 200Mi limit for csi-provisioner
2021-02-11 11:41:21 +08:00
andyzhangx 340b14a75a fix: set 200Mi limit for csi-provisioner
update chart file permission
2021-02-11 01:56:22 +00:00
andyzhangx 1c97d2cce4 test: set lower logLevel in e2e test
update chart file
2021-02-11 01:50:14 +00:00
Andy Zhang 17fe20dd80
Merge pull request #156 from andyzhangx/create-dir
fix: makeDir error in CreateVolume
2021-02-11 08:44:52 +08:00
andyzhangx e8ea4c3be2 fix: makeDir error in CreateVolume 2021-02-10 14:42:19 +00:00
Andy Zhang 87e6ba8084
Merge pull request #151 from andyzhangx/verify-helm-chart-files
test: add verify-helm-chart-files.sh script
2021-02-05 22:28:04 +08:00
andyzhangx de8340e5ed test: add verify-helm-chart-files.sh script
typo
2021-02-05 13:30:30 +00:00
Kubernetes Prow Robot 63c5d8af7e
Merge pull request #149 from boddumanohar/issues-131
provide more driver info in logs
2021-02-05 00:34:52 -08:00
Manohar Reddy 38780f4630 provide more driver info in logs 2021-02-05 12:26:33 +05:30
Kubernetes Prow Robot 7285c51caf
Merge pull request #147 from pohly/prow-update-master
master: update release-tools
2021-02-04 08:44:29 -08:00
Andy Zhang ab42e03317
Merge pull request #143 from andyzhangx/disable-nodestage
cleanup: disable NodeStageVolume
2021-02-04 18:47:27 +08:00
Patrick Ohly 58292df724 Merge commit '495ae2ec938c5285a287ff9ea30e7fa3191ddbf8' into prow-update-master 2021-02-03 22:06:34 +01:00
Patrick Ohly 495ae2ec93 Squashed 'release-tools/' changes from 1d60e77..7bc70e5
7bc70e5 Merge pull request #129 from pohly/squash-documentation
e0b02e7 README.md: document usage of --squash
316cb95 Merge pull request #132 from yiyang5055/bugfix/boilerplate
26e2ab1 fix: default boilerplate path
1add8c1 Merge pull request #133 from pohly/kubernetes-1.20-tag
3e811d6 prow.sh: fix "on-master" prow jobs

git-subtree-dir: release-tools
git-subtree-split: 7bc70e5264a5ce5f47780bdbc6c7b7f4e79243fa
2021-02-03 22:06:32 +01:00
Kubernetes Prow Robot 9f68086e06
Merge pull request #146 from songjiaxun/add_runonmaster
fix: add runOnMaster switch for helm chart
2021-02-03 04:00:29 -08:00
Jiaxun Song 04fb648466 fix: add runOnMaster switch for helm chart 2021-02-03 00:29:05 -08:00
Andy Zhang 0dd317be23
Merge pull request #145 from andyzhangx/verify-helm-chart2
fix: update tgz chart file
2021-01-31 21:42:41 +08:00
andyzhangx 31d86050c1 fix: update tgz chart file 2021-01-31 13:33:39 +00:00
Andy Zhang 52430fa247
Update README.md 2021-01-31 10:58:36 +08:00
Andy Zhang 8e7024556a
Merge pull request #144 from andyzhangx/add-helm-chart
fix: add latest helm chart file
2021-01-30 23:18:54 +08:00
andyzhangx 3ae1300477 fix: add latest helm chart file
update version num
2021-01-30 14:27:52 +00:00
andyzhangx 29ecada024 cleanup: disable NodeStageVolume 2021-01-30 01:52:22 +00:00
Kubernetes Prow Robot 6b9f0d4526
Merge pull request #141 from pohly/prow-update-master
master: update release-tools
2021-01-26 17:09:40 -08:00
Patrick Ohly e2422fd153 Merge commit '7ca289055f849d53dfb6f9591f67551be2de593a' into prow-update-master 2021-01-26 20:50:43 +01:00
Patrick Ohly 7ca289055f Squashed 'release-tools/' changes from 9289fd1..1d60e77
1d60e77 Merge pull request #131 from pohly/kubernetes-1.20-tag
9f10459 prow.sh: support building Kubernetes for a specific version
fe1f284 Merge pull request #121 from kvaps/namespace-check
8fdf0f7 Merge pull request #128 from fengzixu/master
1c94220 fix: fix a bug of csi-sanity
a4c41e6 Merge pull request #127 from pohly/fix-boilerplate
ece0f50 check namespace for snapshot-controller
dbd8967 verify-boilerplate.sh: fix path to script

git-subtree-dir: release-tools
git-subtree-split: 1d60e7792624a9938c0bd1b045211fbb89e513d6
2021-01-26 20:50:33 +01:00
Andy Zhang f00d3f28ff
Merge pull request #140 from andyzhangx/update-chart-latest
chore: update latest chart
2021-01-25 21:08:51 +08:00
andyzhangx 46e7e4b542 chore: update latest chart 2021-01-25 12:24:49 +00:00
Kubernetes Prow Robot d79abf6378
Merge pull request #139 from adamcooke/rename-identityserver
chore: rename indentityserver.go to identityserver.go
2021-01-20 20:25:01 -08:00
andyzhangx f05d3ca943 chore: rename indentityserver.go to identityserver.go 2021-01-21 04:00:56 +00:00
Andy Zhang 7a1256a835
Merge pull request #138 from andyzhangx/reduce-logs
fix: reduce driver logs
2021-01-21 11:57:35 +08:00
andyzhangx 45fa96612c chore: reduce csi sidecar container logs 2021-01-20 06:57:52 +00:00
andyzhangx e7cdcedcc4 fix: reduce driver logs 2021-01-20 06:53:19 +00:00
Andy Zhang 3e9ef1e80d
Merge pull request #137 from andyzhangx/klog
chore: use klog instead of glog
2021-01-20 11:50:55 +08:00
andyzhangx 4e11d4322d chore: use klog instead of glog
chore: use klog in nfs binary build

update go mod
2021-01-19 14:37:40 +00:00
Andy Zhang c8fa5a9a58
Merge pull request #136 from andyzhangx/refactor-verify-examples
test: refactor verify example test
2021-01-19 09:45:05 +08:00
andyzhangx 67218855ab test: refactor verify example test
fix image
2021-01-18 14:31:26 +00:00
Kubernetes Prow Robot 7271a3cc0f
Merge pull request #134 from sachinkumarsingh092/enable-spelling-boilerplate-prow-checks
Enable spelling and boilerplate checks in prow and local tests
2021-01-16 05:01:43 -08:00
Sachin Kumar Singh dccf8558da Enable spelling and boilerplate checks in prow and local tests 2021-01-16 14:59:57 +05:30
Kubernetes Prow Robot 12917300e6
Merge pull request #133 from sachinkumarsingh092/enable-spelling-boilerplate-check
Update release tools
2021-01-15 15:25:44 -08:00
Sachin Kumar Singh 5b7c4506ad Squashed 'release-tools/' changes from c6a88c6..9289fd1
9289fd1 Merge pull request #125 from sachinkumarsingh092/optional-spelling-boilerplate-checks
ad29307 Make the spelling and boilerplate checks optional
5f06d02 Merge pull request #124 from sachinkumarsingh092/fix-spellcheck-boilerplate-tests
48186eb Fix spelling and boilerplate errors
71690af Merge pull request #122 from sachinkumarsingh092/include-spellcheck-boilerplate-tests
981be3f Adding spelling and boilerplate checks.
2bb7525 Merge pull request #117 from fengzixu/master
3b6d17b Merge pull request #118 from pohly/cloud-build-timeout
9318c6c cloud build: double the timeout, now 1 hour
4ab8b15 use the tag to replace commit of csi-test
5d74e45 change the csi-test import path to v4
7dcd0a9 upgrade csi-test to v4.0.2
86ff580 Merge pull request #116 from andyzhangx/export-image-name
c3a9662 allow export image name and registry name

git-subtree-dir: release-tools
git-subtree-split: 9289fd16c8e8aeb2759da3bcbd0937ed2913f011
2021-01-16 00:35:15 +05:30
Sachin Kumar Singh bf73c6c8a0 Merge commit '5b7c4506ad0dd649042fb624a0b8fbb32d505caa' into enable-spelling-boilerplate-check 2021-01-16 00:35:15 +05:30
Andy Zhang 3e072c6aa4
Update README.md 2021-01-06 20:21:12 +08:00
Andy Zhang 36c1d5a602
Update README.md 2021-01-06 19:46:31 +08:00
Andy Zhang 5686d3e46a
Update README.md 2021-01-06 19:45:48 +08:00
Kubernetes Prow Robot 7d2f222a81
Merge pull request #124 from dr0pdb/test_coverage
test: Add missing unit tests for controller server and utils
2021-01-03 20:21:56 -08:00
Andy Zhang 1168c24950
Merge pull request #130 from andyzhangx/windows-ut
test: add windows unit test action
2021-01-04 11:32:23 +08:00
andyzhangx 9e149bc5ee test: add windows unit test action 2021-01-04 03:18:43 +00:00
Andy Zhang d0b0ea08c3
Merge pull request #129 from andyzhangx/enable-action-all-branches
test: enable GH actions on all branches
2021-01-04 10:57:53 +08:00
andyzhangx 960cbdd09f test: enable GH action on all branches 2021-01-04 02:38:22 +00:00
Saurav Tiwary d83f52d916 test: Add missing unit tests for controller server and utils 2021-01-03 21:25:53 +05:30
Andy Zhang d92f45196f
Merge pull request #127 from andyzhangx/add-ubuntu-action
test: add unit test action on Ubuntu
2021-01-03 21:54:20 +08:00
andyzhangx abae50d993 test: disable spelling test temporarily
test: disable integration test in action

fix test failure
2021-01-03 13:27:36 +00:00
Andy Zhang 5097bb1ab8
Merge pull request #126 from andyzhangx/NodeGetVolumeStats
feat: add NodeGetVolumeStats support
2021-01-03 20:54:13 +08:00
andyzhangx 1f14355a91 test: disable verify-boilerplate temporalily 2021-01-03 12:51:17 +00:00
andyzhangx 407501e5d1 test: add unit test action on Ubuntu 2021-01-03 12:33:07 +00:00
andyzhangx 48406c1afd test: add VolumeGetStats test 2021-01-03 12:22:00 +00:00
andyzhangx 94e5bf7020 feat: add NodeGetVolumeStats support 2021-01-03 12:02:13 +00:00
Andy Zhang 5b2dda0477
Merge pull request #125 from andyzhangx/upgrade-k8s-dependency
chore: upgrade k8s dependencies
2021-01-02 09:33:19 +08:00
andyzhangx 04991c36af chore: upgrade k8s v0.19.0 dependency to v0.20.0 2021-01-02 00:57:16 +00:00
andyzhangx f7a1b9aec1 chore: upgrade k8s dependencies 2021-01-02 00:46:27 +00:00
Andy Zhang 259fdf92b4
Update csi-debug.md 2020-12-27 21:42:00 +08:00
Andy Zhang c1d04d8eff
Merge pull request #122 from andyzhangx/createvolume-mountoptions
fix: support mountOptions in CreateVolume
2020-12-27 21:24:37 +08:00
andyzhangx 3622c703d6 chore: refactor logging 2020-12-27 12:54:25 +00:00
andyzhangx a0ad5ca5b6 fix: support mountOptions in CreateVolume 2020-12-27 03:59:09 +00:00
Andy Zhang 683838d7bb
Merge pull request #120 from andyzhangx/format-yaml-files
doc: format yaml files
2020-12-27 11:51:54 +08:00
Andy Zhang d59e090cf0
Update README.md 2020-12-27 11:36:58 +08:00
andyzhangx 473a7d3911 doc: change master branch image address 2020-12-27 03:21:44 +00:00
Andy Zhang 9d781a9180
Merge pull request #119 from andyzhangx/sanity-test-v4.0.2
test: upgrade sanity-test to v4.0.2
2020-12-26 22:07:57 +08:00
andyzhangx a1b1a49a9a doc: format yaml files 2020-12-26 14:06:58 +00:00
andyzhangx c18ce9d43f test: upgrade sanity-test to v4.0.2 2020-12-26 13:29:45 +00:00
Andy Zhang c7ec3f94c9
Merge pull request #118 from andyzhangx/refine-sanity-test-script
test: refine sanity test script
2020-12-26 21:27:08 +08:00
andyzhangx 4c6213dc3f chore: switch to 3.0.0 for master branch
revise version

sleep 10s
2020-12-26 02:45:23 +00:00
andyzhangx ddeb6a8e5f test: remove sanity test in GH action 2020-12-25 15:12:21 +00:00
andyzhangx 87dce63c7a doc: revise PR template
fix test failure
2020-12-25 15:04:09 +00:00
andyzhangx fb19556749 test: refine sanity test script 2020-12-25 14:37:12 +00:00
Kubernetes Prow Robot f5b513f1be
Merge pull request #117 from songjiaxun/azurestack
fix: limit node server to deploy only on Linux nodes
2020-12-22 03:00:26 -08:00
Jiaxun Song 6e0d293e7e fix: limit node server to deploy only on Linux nodes 2020-12-17 16:10:13 -08:00
Andy Zhang fafa7546ff
Update README.md 2020-12-11 21:21:15 +08:00
Kubernetes Prow Robot 892d36b1a0
Merge pull request #109 from mayankshah1607/mayank/lint
CI: enable golint
2020-12-02 02:52:50 -08:00
Kubernetes Prow Robot 556a4c42d6
Merge pull request #110 from msau42/vendor
Update vendor to k8s 1.19 and csi-lib-utils to 0.9.0
2020-12-01 01:42:50 -08:00
Michelle Au 1238d27bad Update vendor to k8s 1.19 and csi-lib-utils to 0.9.0
Change-Id: I607c182c09a88a7daf1e4ffb67a28ab16d1f23ae
2020-11-30 18:23:47 -08:00
Mayank Shah 27380925e4 CI: enable golint
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-30 16:22:10 +05:30
Andy Zhang abf77a09f6
Merge pull request #108 from andyzhangx/release-image-fix
fix: release-image.sh script
2020-11-27 21:30:42 +08:00
andyzhangx 61aa405a72 fix: release-image.sh script 2020-11-27 05:39:15 +00:00
Andy Zhang 0719b0ec5f
Merge pull request #107 from andyzhangx/release-tool-update
Release tool update
2020-11-27 13:38:09 +08:00
andyzhangx 31eda9674b Merge commit '86ff580217f7b59219ae9a42b1311969a2723c72' 2020-11-27 03:35:16 +00:00
Kubernetes Prow Robot 86ff580217
Merge pull request #116 from andyzhangx/export-image-name
allow export registry name
2020-11-26 03:46:20 -08:00
andyzhangx c3a9662513 allow export image name and registry name
revert part of change
2020-11-26 08:00:45 +00:00
Kubernetes Prow Robot 2c4be023da
Merge pull request #103 from kubernetes-csi/release_tools2
Update release tools
2020-11-25 06:50:39 -08:00
Kubernetes Prow Robot 69f82d8a11
Merge pull request #106 from mayankshah1607/ut
test: Add remaining unit tests
2020-11-24 01:11:02 -08:00
Mayank Shah f0524bd617 Remove coveralls GH Action
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-24 12:52:01 +05:30
Mayank Shah e04b0f1117 Add goveralls GH Actions
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-24 12:48:51 +05:30
Mayank Shah 9f73baae64 test: Add remaining unit tests
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-24 12:38:52 +05:30
Kubernetes Prow Robot 77daea95f6
Merge pull request #101 from mayankshah1607/mayank/ut
test: Add unit tests for identityserver and nodeserver
2020-11-23 02:47:35 -08:00
Mayank Shah 35e3b0a065 test: Add unit tests for identityserver and nodeserver
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-23 12:42:32 +05:30
Kubernetes Prow Robot dd9d86f34e
Merge pull request #104 from songjiaxun/fix_doc
doc: improve documentations following SMB driver repo
2020-11-22 04:27:35 -08:00
Jiaxun Song 1fed4f3cd8 doc: improve documentations following SMB driver repo 2020-11-20 21:10:46 +00:00
Kubernetes Prow Robot c6a88c6ed9
Merge pull request #113 from xing-yang/install_snapshot_controller
Fix the install of snapshot CRDs and controller
2020-11-18 13:13:37 -08:00
xing-yang 45ec4c69fb Fix the install of snapshot CRDs and controller
This PR installs snapshot CRDs and rbac rules from the repo
and installs snapshot controller from a local image if it is
a PR in external-snapshotter repo.
Otherwise it uses main or a stable version.
2020-11-18 20:07:44 +00:00
Kubernetes Prow Robot 5d874cce4e
Merge pull request #112 from xing-yang/cleanup
Cleanup
2020-11-12 23:10:24 -08:00
xing-yang 79bbca7bc8 Cleanup 2020-11-12 19:26:36 +00:00
Kubernetes Prow Robot d43767304b
Merge pull request #111 from xing-yang/update_snapshot_v1_rc
Update snapshot CRD version
2020-11-12 11:13:08 -08:00
xing-yang 57718f834e Update snapshot CRD version 2020-11-12 19:11:08 +00:00
Kubernetes Prow Robot 4aff857d88
Merge pull request #109 from pohly/alpha-test-defaults
prow.sh: only run alpha tests for latest Kubernetes release
2020-10-27 10:10:00 -07:00
Kubernetes Prow Robot 0427289d5f
Merge pull request #110 from pohly/kind-0.9-bazel-build-workaround
prow.sh: work around "kind build node-image" failure
2020-10-27 09:54:00 -07:00
Patrick Ohly 9a370ab902 prow.sh: work around "kind build node-image" failure
Kind 0.9.0 accesses the "bazel-out" directory with a relative path,
which only works when the command is invoked inside the Kubernetes
source code
directory (https://github.com/kubernetes-sigs/kind/issues/1910).
2020-10-27 13:16:57 +01:00
Patrick Ohly 522361ec9a prow.sh: only run alpha tests for latest Kubernetes release
Commit 7bcee13d79 added alpha feature gates for Kubernetes 1.19 in
the CSI_PROW_E2E_ALPHA_GATES_LATEST variable based on the comment in
https://github.com/kubernetes-csi/external-provisioner/pull/493#discussion_r502663402
that alpha testing only runs for the latest Kubernetes.

But some components (like external-health-monitor) are configured with
a single Prow job which runs the default set of tests on a stable
Kubernetes release (currently 1.17). Those tests used to include alpha
testing which then broke during Kind cluster startup because the
Kubernetes 1.19 feature gates weren't recognized by 1.17.

The solution is to disable alpha testing for Kubernetes != latest in
the default set of tests.
2020-10-27 13:12:26 +01:00
Kubernetes Prow Robot 22c0395c9c
Merge pull request #108 from bnrjee/master
Add go ldflags using LDFLAGS at the time of compilation
2020-10-25 23:57:01 -07:00
Abhisek Banerjee b5b447b50b Add go ldflags using LDFLAGS at the time of compilation 2020-10-23 19:03:06 +00:00
Kubernetes Prow Robot 16f4afbd83
Merge pull request #107 from pohly/kind-update
prow.sh: update to kind 0.9, support Kubernetes 1.19
2020-10-20 18:10:19 -07:00
Patrick Ohly 7bcee13d79 prow.sh: update to kind 0.9, support Kubernetes 1.19
kind 0.9 adds support for recent Kubernetes releases like 1.19 and
simplifies configuration of feature gates and runtime config.

With Kubernetes 1.19, new feature gates were introduced which might
become relevant for the alpha Prow jobs.

The updated kind release comes with images for different Kubernetes
releases than the one before. To avoid breaking existing jobs,
the script now picks kind images automatically. As an additional
bonus, it then uses images with hash, i.e. it's less likely to break
if those image tags change because of a future kind release.
2020-10-17 11:25:52 +02:00
Patrick Ohly df518fbd6a prow.sh: usage of Bazel optional
Bazel makes sense in the Prow jobs because those often get invoked
with a pre-populated Bazel cache. But local invocation don't need it
and now can turn it off with CSI_PROW_USE_BAZEL=false.
2020-10-17 11:21:29 +02:00
Kubernetes Prow Robot c3afd427e8
Merge pull request #104 from xing-yang/snapshot
Update to snapshot-controller v3.0.0
2020-10-12 12:02:49 -07:00
xing-yang dde93b220e Update to snapshot-controller v3.0.0 2020-10-09 03:33:10 +00:00
Kubernetes Prow Robot a0f195cc2d
Merge pull request #106 from msau42/fix-canary
Only set staging registry when running canary job
2020-10-06 11:32:42 -07:00
Michelle Au 7100c1209e Only set staging registry when running canary job 2020-10-06 11:25:19 -07:00
Kubernetes Prow Robot b3c65f9c78
Merge pull request #99 from msau42/add-release-process
Update release process
2020-10-05 04:37:05 -07:00
Kubernetes Prow Robot e53f3e85b7
Merge pull request #103 from msau42/fix-canary
Use staging registry for canary tests
2020-09-29 02:01:26 -07:00
Michelle Au d129462878 Document new method for adding CI jobs are new K8s versions 2020-09-25 17:49:38 -07:00
Michelle Au e73c2ce531 Use staging registry for canary tests 2020-09-25 17:41:33 -07:00
Michelle Au 2c098465dd Add cleanup instructions to release-notes generation 2020-08-24 16:44:58 -07:00
4204 changed files with 538725 additions and 249333 deletions

View File

@ -36,5 +36,5 @@ If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
none
```

66
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,66 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master, 'release-**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, 'release-**' ]
schedule:
- cron: '0 */24 * * *'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.18
id: go
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
run: |
make all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

15
.github/workflows/codespell.yml vendored Normal file
View File

@ -0,0 +1,15 @@
# GitHub Action to automate the identification of common misspellings in text files.
# https://github.com/codespell-project/actions-codespell
# https://github.com/codespell-project/codespell
name: codespell
on: [push, pull_request]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh

View File

@ -1,9 +1,7 @@
name: Darwin
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
pull_request: {}
push: {}
jobs:
build:
name: Unit Tests
@ -12,9 +10,11 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: ^1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run unit tests
run: go test -v -race ./pkg/...
run: |
go version
go test -v -race ./pkg/...

35
.github/workflows/linux.yaml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Linux Unit tests
on:
pull_request: {}
push: {}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build Test
run: |
go version
export PATH=$PATH:$HOME/.local/bin
make verify
go test -covermode=count -coverprofile=profile.cov ./pkg/...
export DOCKER_CLI_EXPERIMENTAL=enabled && make container
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github

26
.github/workflows/pluto.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
name: k8s api version check
on:
pull_request: {}
push: {}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# https://pluto.docs.fairwinds.com/advanced/#display-options
- name: Download pluto
uses: FairwindsOps/pluto/github-action@master
- name: Check deploy folder
run: |
pluto detect-files -d deploy
- name: Check example folder
run: |
pluto detect-files -d deploy/example

View File

@ -1,16 +0,0 @@
name: Sanity Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Sanity tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: |
sudo make sanity-test

29
.github/workflows/shellcheck.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: ShellCheck
on:
push:
tags:
- v*
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -e SC2034
with:
severity: warning
check_together: 'yes'
disable_matcher: false
ignore_paths: vendor release-tools hack
format: gcc

View File

@ -4,17 +4,23 @@ on:
push: {}
jobs:
go_lint:
# Enable once https://github.com/kubernetes-csi/csi-driver-nfs/issues/90 is fixed
# name: Go Lint
# runs-on: ubuntu-18.04
# steps:
# - name: Checkout code
# uses: actions/checkout@master
# - name: Run linter
# uses: golangci/golangci-lint-action@v1
# with:
# version: v1.29
# args: -E=gofmt,golint,misspell --timeout=30m0s
name: Go Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Run linter
uses: golangci/golangci-lint-action@v2
with:
version: v1.45
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,contextcheck --timeout=30m0s
verify-helm:
name: Verify Helm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Verify Helm
run: |
hack/verify-helm-chart.sh
sudo snap install yq
sudo hack/verify-helm-chart.sh

40
.github/workflows/trivy.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Trivy vulnerability scanner
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Build an image from Dockerfile
run: |
export PUBLISH=true
export REGISTRY=test
export IMAGE_VERSION=latest
export DOCKER_CLI_EXPERIMENTAL=enabled
export ARCH=amd64
go version
make nfs
make container-build
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'test/nfsplugin:latest-linux-amd64'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'

22
.github/workflows/windows.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Windows Tests
on:
pull_request: {}
push: {}
jobs:
build:
strategy:
matrix:
go: [ '^1.16' ]
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run Windows Unit Tests
run: |
go version
go test -v -race ./pkg/...

View File

@ -1,3 +1,5 @@
#! /bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -12,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#! /bin/bash
# A Prow job can override these defaults, but this shouldn't be necessary.
# Only these tests make sense for csi-driver-nfs until we can integrate k/k
@ -22,4 +22,7 @@
. release-tools/prow.sh
./release-tools/verify-boilerplate.sh "$(pwd)"
./release-tools/verify-spelling.sh "$(pwd)"
main

View File

@ -12,11 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM centos:latest
FROM registry.k8s.io/build-image/debian-base:bullseye-v1.2.0
# Copy nfsplugin from build _output directory
COPY bin/nfsplugin /nfsplugin
ARG ARCH
ARG binary=./bin/${ARCH}/nfsplugin
COPY ${binary} /nfsplugin
RUN yum -y install nfs-utils epel-release jq && yum clean all
RUN apt update && apt upgrade -y && apt-mark unhold libcap2 && clean-install ca-certificates mount nfs-common netbase
ENTRYPOINT ["/nfsplugin"]

120
Makefile
View File

@ -13,7 +13,7 @@
# limitations under the License.
CMDS=nfsplugin
DEPLOY_FOLDER = ./deploy/kubernetes
DEPLOY_FOLDER = ./deploy
CMDS=nfsplugin
PKG = github.com/kubernetes-csi/csi-driver-nfs
GINKGO_FLAGS = -ginkgo.v
@ -24,19 +24,34 @@ DOCKER_CLI_EXPERIMENTAL = enabled
export GOPATH GOBIN GO111MODULE DOCKER_CLI_EXPERIMENTAL
include release-tools/build.make
LDFLAGS = "-X ${PKG}/pkg/nfs.driverVersion=${IMAGE_VERSION} -s -w -extldflags '-static'"
GIT_COMMIT ?= $(shell git rev-parse HEAD)
IMAGE_VERSION ?= v0.5.0
GIT_COMMIT = $(shell git rev-parse HEAD)
BUILD_DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
IMAGE_VERSION ?= v4.1.0
LDFLAGS = -X ${PKG}/pkg/nfs.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/nfs.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/nfs.buildDate=${BUILD_DATE}
EXT_LDFLAGS = -s -w -extldflags "-static"
# Use a custom version for E2E tests if we are testing in CI
ifdef CI
ifndef PUBLISH
override IMAGE_VERSION := e2e-$(GIT_COMMIT)
endif
endif
IMAGE_NAME = nfsplugin
IMAGENAME ?= nfsplugin
REGISTRY ?= andyzhangx
REGISTRY_NAME = $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
IMAGE_TAG = $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_VERSION)
REGISTRY_NAME ?= $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
IMAGE_TAG = $(REGISTRY)/$(IMAGENAME):$(IMAGE_VERSION)
IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGENAME):latest
E2E_HELM_OPTIONS ?= --set image.nfs.repository=$(REGISTRY)/$(IMAGENAME) --set image.nfs.tag=$(IMAGE_VERSION) --set image.nfs.pullPolicy=Always --set feature.enableInlineVolume=true
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
# Output type of docker buildx build
OUTPUT_TYPE ?= docker
ALL_ARCH.linux = arm64 amd64 ppc64le
ALL_OS_ARCH = linux-arm64 linux-arm-v7 linux-amd64 linux-ppc64le
.EXPORT_ALL_VARIABLES:
all: nfs
@ -61,39 +76,65 @@ local-build-push: nfs
docker build -t $(LOCAL_USER)/nfsplugin:latest .
docker push $(LOCAL_USER)/nfsplugin
.PHONY: local-k8s-install
local-k8s-install:
echo "Instlling locally"
kubectl apply -f $(DEPLOY_FOLDER)/rbac-csi-nfs-controller.yaml
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-driverinfo.yaml
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-controller.yaml
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-node.yaml
echo "Successfully installed"
.PHONY: local-k8s-uninstall
local-k8s-uninstall:
echo "Uninstalling driver"
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-controller.yaml --ignore-not-found
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-node.yaml --ignore-not-found
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-driverinfo.yaml --ignore-not-found
kubectl delete -f $(DEPLOY_FOLDER)/rbac-csi-nfs-controller.yaml --ignore-not-found
echo "Uninstalled NFS driver"
.PHONY: nfs
nfs:
CGO_ENABLED=0 GOOS=linux go build -a -ldflags ${LDFLAGS} -mod vendor -o bin/nfsplugin ./cmd/nfsplugin
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/${ARCH}/nfsplugin ./cmd/nfsplugin
.PHONY: nfs-armv7
nfs-armv7:
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/arm/v7/nfsplugin ./cmd/nfsplugin
.PHONY: container-build
container-build:
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="linux/$(ARCH)" \
-t $(IMAGE_TAG)-linux-$(ARCH) --build-arg ARCH=$(ARCH) .
.PHONY: container-linux-armv7
container-linux-armv7:
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="linux/arm/v7" \
-t $(IMAGE_TAG)-linux-arm-v7 --build-arg ARCH=arm/v7 .
.PHONY: container
container: nfs
docker build --no-cache -t $(IMAGE_TAG) .
container:
docker buildx rm container-builder || true
docker buildx create --use --name=container-builder
# enable qemu for arm64 build
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
docker run --rm --privileged tonistiigi/binfmt --install all
for arch in $(ALL_ARCH.linux); do \
ARCH=$${arch} $(MAKE) nfs; \
ARCH=$${arch} $(MAKE) container-build; \
done
$(MAKE) nfs-armv7
$(MAKE) container-linux-armv7
.PHONY: push
push:
ifdef CI
docker manifest create --amend $(IMAGE_TAG) $(foreach osarch, $(ALL_OS_ARCH), $(IMAGE_TAG)-${osarch})
docker manifest push --purge $(IMAGE_TAG)
docker manifest inspect $(IMAGE_TAG)
else
docker push $(IMAGE_TAG)
endif
.PHONY: push-latest
push-latest:
ifdef CI
docker manifest create --amend $(IMAGE_TAG_LATEST) $(foreach osarch, $(ALL_OS_ARCH), $(IMAGE_TAG)-${osarch})
docker manifest push --purge $(IMAGE_TAG_LATEST)
docker manifest inspect $(IMAGE_TAG_LATEST)
else
docker tag $(IMAGE_TAG) $(IMAGE_TAG_LATEST)
docker push $(IMAGE_TAG_LATEST)
endif
.PHONY: install-nfs-server
install-nfs-server:
kubectl apply -f ./examples/nfs-server.yaml
kubectl apply -f ./deploy/example/nfs-provisioner/nfs-server.yaml
kubectl delete secret mount-options --ignore-not-found
kubectl create secret generic mount-options --from-literal mountOptions="nfsvers=4.1"
.PHONY: install-helm
install-helm:
@ -101,11 +142,12 @@ install-helm:
.PHONY: e2e-bootstrap
e2e-bootstrap: install-helm
docker pull $(IMAGE_TAG) || make container push
OUTPUT_TYPE=registry $(MAKE) container push
helm install csi-driver-nfs ./charts/latest/csi-driver-nfs --namespace kube-system --wait --timeout=15m -v=5 --debug \
--set image.nfs.repository=$(REGISTRY)/$(IMAGE_NAME) \
--set image.nfs.tag=$(IMAGE_VERSION) \
--set image.nfs.pullPolicy=Always
${E2E_HELM_OPTIONS} \
--set controller.dnsPolicy=ClusterFirstWithHostNet \
--set controller.logLevel=8 \
--set node.logLevel=8
.PHONY: e2e-teardown
e2e-teardown:
@ -113,10 +155,8 @@ e2e-teardown:
.PHONY: e2e-test
e2e-test:
go test -v -timeout=0 ./test/e2e ${GINKGO_FLAGS}
.PHONY: create-example-deployment
create-example-deployment:
kubectl apply -f ./examples/storageclass-nfs.yaml
kubectl apply -f ./examples/deployment.yaml
kubectl apply -f ./examples/statefulset.yaml
if [ ! -z "$(EXTERNAL_E2E_TEST)" ]; then \
bash ./test/external-e2e/run.sh;\
else \
go test -v -timeout=0 ./test/e2e ${GINKGO_FLAGS};\
fi

7
OWNERS
View File

@ -1,10 +1,7 @@
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
approvers:
- kubernetes-csi-approvers
- andyzhangx
- msau42
- saad-ali
reviewers:
- andyzhangx
- msau42
- saad-ali
- kubernetes-csi-reviewers

1
OWNERS_ALIASES Symbolic link
View File

@ -0,0 +1 @@
release-tools/KUBERNETES_CSI_OWNERS_ALIASES

103
README.md
View File

@ -1,88 +1,40 @@
# CSI NFS driver
# NFS CSI driver for Kubernetes
![build status](https://github.com/kubernetes-csi/csi-driver-nfs/actions/workflows/linux.yaml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/kubernetes-csi/csi-driver-nfs/badge.svg?branch=master)](https://coveralls.io/github/kubernetes-csi/csi-driver-nfs?branch=master)
## Overview
### Overview
This is a repository for [NFS](https://en.wikipedia.org/wiki/Network_File_System) [CSI](https://kubernetes-csi.github.io/docs/) Driver.
Currently it implements bare minimum of the [CSI spec](https://github.com/container-storage-interface/spec) and is in the alpha state
of the development.
This is a repository for [NFS](https://en.wikipedia.org/wiki/Network_File_System) [CSI](https://kubernetes-csi.github.io/docs/) driver, csi plugin name: `nfs.csi.k8s.io`. This driver requires existing and already configured NFSv3 or NFSv4 server, it supports dynamic provisioning of Persistent Volumes via Persistent Volume Claims by creating a new sub directory under NFS server.
#### CSI Feature matrix
### Project status: GA
| **nfs.csi.k8s.io** | K8s version compatibility | CSI versions compatibility | Dynamic Provisioning | Resize | Snapshots | Raw Block | AccessModes | Status |
|--------------------|---------------------------|----------------------------|----------------------|--------|-----------|-----------|--------------------------|------------------------------------------------------------------------------|
|master | 1.14 + | v1.0 + | no | no | no | no | Read/Write Multiple Pods | Alpha |
|v2.0.0 | 1.14 + | v1.0 + | no | no | no | no | Read/Write Multiple Pods | Alpha |
|v1.0.0 | 1.9 - 1.15 | v1.0 | no | no | no | no | Read/Write Multiple Pods | [deprecated](https://github.com/kubernetes-csi/drivers/tree/master/pkg/nfs) |
### Container Images & Kubernetes Compatibility:
|driver version | supported k8s version | status |
|----------------|-----------------------|--------|
|master branch | 1.20+ | GA |
|v4.0.0 | 1.10+ | GA |
|v3.1.0 | 1.19+ | beta |
|v3.0.0 | 1.19+ | beta |
|v2.0.0 | 1.14+ | alpha |
## Requirements
### Install driver on a Kubernetes cluster
- install by [kubectl](./docs/install-nfs-csi-driver.md)
- install by [helm charts](./charts)
The CSI NFS driver requires Kubernetes cluster of version 1.14 or newer and
preexisting NFS server, whether it is deployed on cluster or provisioned
independently. The plugin itself provides only a communication layer between
resources in the cluser and the NFS server.
### Driver parameters
Please refer to [`nfs.csi.k8s.io` driver parameters](./docs/driver-parameters.md)
## Install NFS CSI driver on a kubernetes cluster
Please refer to [install NFS CSI driver](https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/docs/install-csi-driver.md).
### Examples
- [Basic usage](./deploy/example/README.md)
- [fsGroupPolicy](./deploy/example/fsgroup)
## Example
### Troubleshooting
- [CSI driver troubleshooting guide](./docs/csi-debug.md)
There are multiple ways to create a kubernetes cluster, the NFS CSI plugin
should work invariantly of your cluster setup. Very simple way of getting
a local environment for testing can be achieved using for example
[kind](https://github.com/kubernetes-sigs/kind).
## Kubernetes Development
Please refer to [development guide](./docs/csi-dev.md)
There are also multiple different NFS servers you can use for testing of
the plugin, the major versions of the protocol v2, v3 and v4 should be supported
by the current implementation.
The example assumes you have your cluster created (e.g. `kind create cluster`)
and working NFS server (e.g. https://github.com/rootfs/nfs-ganesha-docker)
#### Deploy
Deploy the NFS plugin along with the `CSIDriver` info.
```console
kubectl create -f deploy/kubernetes
```
#### Example Nginx application
The [/examples/kubernetes/nginx.yaml](/examples/kubernetes/nginx.yaml) contains a `PersistentVolume`,
`PersistentVolumeClaim` and an nginx `Pod` mounting the NFS volume under `/var/www`.
You will need to update the NFS Server IP and the share information under
`volumeAttributes` inside `PersistentVolume` in `nginx.yaml` file to match your
NFS server public end point and configuration. You can also provide additional
`mountOptions`, such as protocol version, in the `PersistentVolume` `spec`
relevant for your NFS Server.
```console
kubectl create -f examples/kubernetes/nginx.yaml
```
## Running Kubernetes End To End tests on an NFS Driver
First, stand up a local cluster `ALLOW_PRIVILEGED=1 hack/local-up-cluster.sh` (from your Kubernetes repo)
For Fedora/RHEL clusters, the following might be required:
```console
sudo chown -R $USER:$USER /var/run/kubernetes/
sudo chown -R $USER:$USER /var/lib/kubelet
sudo chcon -R -t svirt_sandbox_file_t /var/lib/kubelet
```
If you are plannig to test using your own private image, you could either install your nfs driver using your own set of YAML files, or edit the existing YAML files to use that private image.
When using the [existing set of YAML files](https://github.com/kubernetes-csi/csi-driver-nfs/tree/master/deploy/kubernetes), you would edit [csi-nfs-node.yaml](https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/deploy/kubernetes/csi-nfs-node.yaml#L45) files to include your private image instead of the default one. After editing these files, skip to step 3 of the following steps.
If you already have a driver installed, skip to step 4 of the following steps.
1) Build the nfs driver by running `make`
2) Create NFS Driver Image, where the image tag would be whatever that is required by your YAML deployment files `docker build -t quay.io/k8scsi/nfsplugin:v2.0.0 .`
3) Install the Driver: `kubectl create -f deploy/kubernetes`
4) Build E2E test binary: `make build-tests`
5) Run E2E Tests using the following command: `./bin/tests --ginkgo.v --ginkgo.progress --kubeconfig=/var/run/kubernetes/admin.kubeconfig`
## Community, discussion, contribution, and support
### Community, discussion, contribution, and support
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
@ -91,7 +43,6 @@ You can reach the maintainers of this project at:
- [Slack channel](https://kubernetes.slack.com/messages/sig-storage)
- [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-storage)
### Code of conduct
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).

View File

@ -1,63 +1,92 @@
# Installation with Helm 3
Follow this guide to install the NFS Driver for Kubernetes.
# Install CSI driver with Helm 3
## Prerequisites
- [install Helm](https://helm.sh/docs/intro/quickstart/#install-helm)
- [Install Helm 3](https://helm.sh/docs/intro/quickstart/#install-helm)
### Tips
- make controller only run on master node: `--set controller.runOnMaster=true`
- set replica of controller as `2`: `--set controller.replicas=2`
## Install via `helm install`
```
$ cd charts/latest
$ helm install csi-driver-nfs ./csi-driver-nfs -n kube-system
```
## Install via Helm repository
```
$ helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
$ helm install --name csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system
### install a specific version
```console
helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system --version v4.0.0
```
### Search for available versions
```
$ helm search repo -l csi-driver-nfs
### install driver with customized driver name, deployment name
> only supported from `v3.1.0`+
- following example would install a driver with name `nfs2`
```console
helm install csi-driver-nfs2 csi-driver-nfs/csi-driver-nfs --namespace kube-system --set driver.name="nfs2.csi.k8s.io" --set controller.name="csi-nfs2-controller" --set rbac.name=nfs2 --set serviceAccount.controller=csi-nfs2-controller-sa --set serviceAccount.node=csi-nfs2-node-sa --set node.name=csi-nfs2-node --set node.livenessProbe.healthPort=39653
```
### Install a specific version
```
https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts --version v2.0.0
### search for all available chart versions
```console
helm search repo -l csi-driver-nfs
```
## Chart configuration
## uninstall CSI driver
```console
helm uninstall csi-driver-nfs -n kube-system
```
The following table lists the configurable parameters of the latest NFS CSI Driver chart and their default values.
## latest chart configuration
The following table lists the configurable parameters of the latest NFS CSI Driver chart and default values.
| Parameter | Description | Default |
|---------------------------------------------------|------------------------------------------------------------|-------------------------------------------------------------------|
| `image.nfs.repository` | csi-driver-nfs docker image | mcr.microsoft.com/k8s/csi/nfs-csi |
| `image.nfs.tag` | csi-driver-nfs docker image tag | latest |
| `image.nfs.pullPolicy` | csi-driver-nfs image pull policy | IfNotPresent |
| `image.csiProvisioner.repository` | csi-provisioner docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | v1.4.0 |
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | IfNotPresent |
| `image.livenessProbe.repository` | liveness-probe docker image | mcr.microsoft.com/oss/kubernetes-csi/livenessprobe |
| `image.livenessProbe.tag` | liveness-probe docker image tag | v1.1.0 |
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | IfNotPresent |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | v1.2.0 |
| `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | IfNotPresent |
| `serviceAccount.create` | whether create service account of csi-nfs-controller | true |
| `rbac.create` | whether create rbac of csi-nfs-controller | true |
| `controller.replicas` | the replicas of csi-nfs-controller | 2 |
| `driver.name` | alternative driver name | `nfs.csi.k8s.io` |
| `driver.mountPermissions` | mounted folder permissions name | `0777`
| `feature.enableFSGroupPolicy` | enable `fsGroupPolicy` on a k8s 1.20+ cluster | `true` |
| `feature.enableInlineVolume` | enable inline volume | `false` |
| `kubeletDir` | alternative kubelet directory | `/var/lib/kubelet` |
| `image.nfs.repository` | csi-driver-nfs image | `registry.k8s.io/sig-storage/nfsplugin` |
| `image.nfs.tag` | csi-driver-nfs image tag | `latest` |
| `image.nfs.pullPolicy` | csi-driver-nfs image pull policy | `IfNotPresent` |
| `image.csiProvisioner.repository` | csi-provisioner docker image | `registry.k8s.io/sig-storage/csi-provisioner` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v3.1.0` |
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | `IfNotPresent` |
| `image.livenessProbe.repository` | liveness-probe docker image | `registry.k8s.io/sig-storage/livenessprobe` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.6.0` |
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | `IfNotPresent` |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `registry.k8s.io/sig-storage/csi-node-driver-registrar` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.5.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-nfs-controller | `true` |
| `rbac.create` | whether create rbac of csi-nfs-controller | `true` |
| `controller.replicas` | replica number of csi-nfs-controller | `1` |
| `controller.runOnMaster` | run controller on master node | `false` |
| `controller.dnsPolicy` | dnsPolicy of controller driver, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` | `Default` |
| `controller.logLevel` | controller driver log level |`5` |
| `controller.workingMountDir` | working directory for provisioner to mount nfs shares temporarily | `/tmp` |
| `controller.tolerations` | controller pod tolerations | |
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | 100Mi |
| `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 | 100Mi |
| `controller.resources.livenessProbe.requests.cpu` | liveness-probe cpu requests limits | 10m |
| `controller.resources.livenessProbe.requests.memory` | liveness-probe memory requests limits | 20Mi |
| `controller.resources.nfs.limits.memory` | csi-driver-nfs memory limits | 200Mi |
| `controller.resources.nfs.requests.cpu` | csi-driver-nfs cpu requests limits | 10m |
| `controller.resources.nfs.requests.memory` | csi-driver-nfs memory requests limits | 20Mi |
| `node.name` | driver node daemonset name | `csi-nfs-node`
| `node.dnsPolicy` | dnsPolicy of driver node daemonset, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` |
| `node.maxUnavailable` | `maxUnavailable` value of driver node daemonset | `1`
| `node.logLevel` | node driver log level |`5` |
| `node.livenessProbe.healthPort ` | the health check port for liveness probe |`29653` |
| `node.tolerations` | node pod tolerations | |
| `node.resources.livenessProbe.limits.memory` | liveness-probe memory limits | 100Mi |
| `node.resources.livenessProbe.requests.cpu` | liveness-probe cpu requests limits | 10m |
| `node.resources.livenessProbe.requests.memory` | liveness-probe memory requests limits | 20Mi |
| `node.resources.nodeDriverRegistrar.limits.memory` | csi-node-driver-registrar memory limits | 100Mi |
| `node.resources.nodeDriverRegistrar.requests.cpu` | csi-node-driver-registrar cpu requests limits | 10m |
| `node.resources.nodeDriverRegistrar.requests.memory` | csi-node-driver-registrar memory requests limits | 20Mi |
| `node.resources.nfs.limits.memory` | csi-driver-nfs memory limits | 300Mi |
| `node.resources.nfs.requests.cpu` | csi-driver-nfs cpu requests limits | 10m |
| `node.resources.nfs.requests.memory` | csi-driver-nfs memory requests limits | 20Mi |
## Troubleshooting
If there are some errors when using helm to install, follow the steps to debug:
1. Add `--wait -v=5 --debug` in `helm install` command.
2. Then the error pods can be located.
3. Use `kubectl describe` to acquire more info.
4. Check the related resource of the pod, such as serviceaacount, rbac, etc.
## troubleshooting
- Add `--wait -v=5 --debug` in `helm install` command to get detailed error
- Use `kubectl describe` to acquire more info

View File

@ -2,21 +2,12 @@ apiVersion: v1
entries:
csi-driver-nfs:
- apiVersion: v1
appVersion: v2.0.0
created: "2020-11-13T16:06:53.1675609+05:30"
appVersion: v4.2.0
created: "2022-05-06T12:35:56.6991353Z"
description: CSI NFS Driver for Kubernetes
digest: 0a2a89ad91485b277e53bdf41a58c07dbc0f8910cb63494411e46bf17c4a7196
digest: cb537287512ce9f99adaead8cd4904ed7284780bdc44c9b8d6705e66f28bfa5c
name: csi-driver-nfs
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/v2.0.0/csi-driver-nfs-v2.0.0.tgz
version: v2.0.0
- apiVersion: v1
appVersion: latest
created: "2020-11-13T16:06:53.1671254+05:30"
description: CSI NFS Driver for Kubernetes
digest: 0e85c143ff5bc783089d2439e6b533949916657d50e9267d10b8add3dff027eb
name: csi-driver-nfs
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/latest/csi-driver-nfs-latest.tgz
version: latest
generated: "2020-11-13T16:06:53.1665574+05:30"
- https://gitea.devindata.com/devindata-public/csi-driver-nfs/raw/branch/master/charts/v4.2.0/csi-driver-nfs-v4.2.0.tgz
version: v4.2.0
generated: "2022-05-06T12:35:56.693722959Z"

Binary file not shown.

0
charts/latest/csi-driver-nfs/.helmignore Normal file → Executable file
View File

2
charts/latest/csi-driver-nfs/Chart.yaml Normal file → Executable file
View File

@ -2,4 +2,4 @@ apiVersion: v1
appVersion: latest
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: latest
version: v4.1.0

View File

@ -1,11 +1,19 @@
{{/* vim: set filetype=mustache: */}}
{{/* Expand the name of the chart.*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* labels for helm resources */}}
{{- define "nfs.labels" -}}
labels:
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
revision: "{{ .Release.Revision }}"
chart: "{{ .Chart.Name }}"
chartVersion: "{{ .Chart.Version }}"
{{- end -}}
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "nfs.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 -}}

View File

@ -2,35 +2,44 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-nfs-controller
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: csi-nfs-controller
app: {{ .Values.controller.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: csi-nfs-controller
app: {{ .Values.controller.name }}
spec:
serviceAccountName: csi-nfs-controller-sa
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
kubernetes.io/role: master
{{- end}}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
effect: "NoSchedule"
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: csi-provisioner
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
args:
- "-v=5"
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
env:
- name: ADDRESS
value: /csi/csi.sock
@ -38,31 +47,19 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29652
- --v=5
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
- name: nfs
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
securityContext:
@ -72,9 +69,12 @@ spec:
allowPrivilegeEscalation: true
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
args:
- "-v=5"
- "--v={{ .Values.controller.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
- "--working-mount-dir={{ .Values.controller.workingMountDir }}"
env:
- name: NODE_ID
valueFrom:
@ -82,23 +82,29 @@ spec:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
volumes:
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
path: {{ .Values.kubeletDir }}/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

@ -1,9 +1,15 @@
apiVersion: storage.k8s.io/v1beta1
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: nfs.csi.k8s.io
name: {{ .Values.driver.name }}
spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
podInfoOnMount: true
{{- if .Values.feature.enableInlineVolume}}
- Ephemeral
{{- end}}
{{- if .Values.feature.enableFSGroupPolicy}}
fsGroupPolicy: File
{{- end}}

View File

@ -1,52 +1,66 @@
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-nfs-node
name: {{ .Values.node.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: csi-nfs-node
app: {{ .Values.node.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: csi-nfs-node
app: {{ .Values.node.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: csi-nfs-node-sa
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29653
- --v=5
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "rm -rf /registration/csi-nfsplugin /registration/csi-nfsplugin-reg.sock"]
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
args:
- --v=5
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
@ -57,6 +71,7 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
- name: nfs
securityContext:
privileged: true
@ -65,9 +80,11 @@ spec:
allowPrivilegeEscalation: true
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
args :
- "-v=5"
- "--v={{ .Values.node.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
env:
- name: NODE_ID
valueFrom:
@ -75,23 +92,36 @@ spec:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi-nfsplugin
path: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
path: {{ .Values.kubeletDir }}/pods
type: Directory
- hostPath:
path: /var/lib/kubelet/plugins_registry
path: {{ .Values.kubeletDir }}/plugins_registry
type: Directory
name: registration-dir

View File

@ -1,54 +0,0 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-nfs-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end -}}
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-nfs-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: nfs-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

View File

@ -0,0 +1,64 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-node-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end -}}
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

105
charts/latest/csi-driver-nfs/values.yaml Normal file → Executable file
View File

@ -1,23 +1,110 @@
customLabels: {}
image:
nfs:
repository: gcr.io/k8s-staging-sig-storage/nfsplugin
tag: amd64-linux-canary
tag: canary
pullPolicy: IfNotPresent
csiProvisioner:
repository: k8s.gcr.io/sig-storage/csi-provisioner
tag: v2.0.4
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v3.1.0
pullPolicy: IfNotPresent
livenessProbe:
repository: k8s.gcr.io/sig-storage/livenessprobe
tag: v2.1.0
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.7.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
tag: v2.0.1
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.5.1
pullPolicy: IfNotPresent
serviceAccount:
create: true
create: true # When true, service accounts will be created for you. Set to false if you want to use your own.
controller: csi-nfs-controller-sa # Name of Service Account to be created or used
rbac:
create: true
name: nfs
driver:
name: nfs.csi.k8s.io
mountPermissions: 0777
feature:
enableFSGroupPolicy: true
enableInlineVolume: false
kubeletDir: /var/lib/kubelet
controller:
replicas: 2
name: csi-nfs-controller
replicas: 1
runOnMaster: false
livenessProbe:
healthPort: 29652
logLevel: 5
workingMountDir: "/tmp"
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
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"
resources:
csiProvisioner:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
node:
name: csi-nfs-node
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29653
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"

View File

@ -4,15 +4,15 @@ image:
tag: v2.0.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: k8s.gcr.io/sig-storage/csi-provisioner
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v2.0.4
pullPolicy: IfNotPresent
livenessProbe:
repository: k8s.gcr.io/sig-storage/livenessprobe
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.1.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.0.1
pullPolicy: IfNotPresent
serviceAccount:

Binary file not shown.

View File

@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: v3.0.0
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: v3.0.0

View File

@ -0,0 +1,5 @@
The CSI NFS Driver is getting deployed to your cluster.
To check CSI NFS Driver pods status, please run:
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch

View File

@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/* Expand the name of the chart.*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* labels for helm resources */}}
{{- define "nfs.labels" -}}
labels:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "nfs.name" . }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- end -}}

View File

@ -0,0 +1,107 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: {{ .Values.controller.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.controller.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
kubernetes.io/role: master
{{- end}}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: csi-provisioner
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /csi/csi.sock
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }}
volumeMounts:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
- name: nfs
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
args:
- "--v={{ .Values.controller.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
volumes:
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

@ -0,0 +1,11 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ .Values.driver.name }}
spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
{{- if .Values.feature.enableFSGroupPolicy}}
fsGroupPolicy: File
{{- end}}

View File

@ -0,0 +1,126 @@
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.node.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: {{ .Values.node.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.node.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
args :
- "--v={{ .Values.node.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,54 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end -}}
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

View File

@ -0,0 +1,105 @@
image:
nfs:
repository: registry.k8s.io/sig-storage/nfsplugin
tag: v3.0.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v2.2.2
pullPolicy: IfNotPresent
livenessProbe:
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.5.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.4.0
pullPolicy: IfNotPresent
serviceAccount:
create: true # When true, service accounts will be created for you. Set to false if you want to use your own.
controller: csi-nfs-controller-sa # Name of Service Account to be created or used
rbac:
create: true
name: nfs
controller:
name: csi-nfs-controller
replicas: 2
runOnMaster: false
livenessProbe:
healthPort: 29652
logLevel: 5
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
operator: "Exists"
effect: "NoSchedule"
resources:
csiProvisioner:
limits:
cpu: 1
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
cpu: 1
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
node:
name: csi-nfs-node
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29653
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
cpu: 1
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
feature:
enableFSGroupPolicy: false
driver:
name: nfs.csi.k8s.io
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"

Binary file not shown.

View File

@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: v3.1.0
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: v3.1.0

View File

@ -0,0 +1,5 @@
The CSI NFS Driver is getting deployed to your cluster.
To check CSI NFS Driver pods status, please run:
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch

View File

@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/* Expand the name of the chart.*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* labels for helm resources */}}
{{- define "nfs.labels" -}}
labels:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "nfs.name" . }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- end -}}

View File

@ -0,0 +1,109 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: {{ .Values.controller.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.controller.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
kubernetes.io/role: master
{{- end}}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: csi-provisioner
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /csi/csi.sock
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }}
volumeMounts:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
- name: nfs
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
args:
- "--v={{ .Values.controller.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
- "--working-mount-dir={{ .Values.controller.workingMountDir }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
volumes:
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

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

View File

@ -0,0 +1,127 @@
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.node.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: {{ .Values.node.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.node.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
args :
- "--v={{ .Values.node.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,57 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end -}}
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

View File

@ -0,0 +1,102 @@
image:
nfs:
repository: registry.k8s.io/sig-storage/nfsplugin
tag: v3.1.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v2.2.2
pullPolicy: IfNotPresent
livenessProbe:
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.5.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.4.0
pullPolicy: IfNotPresent
serviceAccount:
create: true # When true, service accounts will be created for you. Set to false if you want to use your own.
controller: csi-nfs-controller-sa # Name of Service Account to be created or used
rbac:
create: true
name: nfs
driver:
name: nfs.csi.k8s.io
mountPermissions: 0777
feature:
enableFSGroupPolicy: false
enableInlineVolume: false
controller:
name: csi-nfs-controller
replicas: 2
runOnMaster: false
livenessProbe:
healthPort: 29652
logLevel: 5
workingMountDir: "/tmp"
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
operator: "Exists"
effect: "NoSchedule"
resources:
csiProvisioner:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
node:
name: csi-nfs-node
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29653
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"

Binary file not shown.

View File

@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: v4.0.0
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: v4.0.0

View File

@ -0,0 +1,5 @@
The CSI NFS Driver is getting deployed to your cluster.
To check CSI NFS Driver pods status, please run:
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch

View File

@ -0,0 +1,19 @@
{{/* vim: set filetype=mustache: */}}
{{/* Expand the name of the chart.*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* labels for helm resources */}}
{{- define "nfs.labels" -}}
labels:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "nfs.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 -}}

View File

@ -0,0 +1,110 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: {{ .Values.controller.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.controller.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
kubernetes.io/role: master
{{- end}}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: csi-provisioner
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
env:
- name: ADDRESS
value: /csi/csi.sock
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }}
volumeMounts:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
- name: nfs
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
args:
- "--v={{ .Values.controller.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
- "--working-mount-dir={{ .Values.controller.workingMountDir }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
volumes:
- name: pods-mount-dir
hostPath:
path: {{ .Values.kubeletDir }}/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

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

View File

@ -0,0 +1,126 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.node.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: {{ .Values.node.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.node.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: {{ .Values.controller.dnsPolicy }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
args :
- "--v={{ .Values.node.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
hostPath:
path: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: {{ .Values.kubeletDir }}/pods
type: Directory
- hostPath:
path: {{ .Values.kubeletDir }}/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,57 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end -}}
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

View File

@ -0,0 +1,110 @@
customLabels: {}
image:
nfs:
repository: registry.k8s.io/sig-storage/nfsplugin
tag: v4.2.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v3.3.0
pullPolicy: IfNotPresent
livenessProbe:
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.8.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.6.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-nfs-controller-sa # Name of Service Account to be created or used
rbac:
create: true
name: nfs
driver:
name: nfs.csi.k8s.io
mountPermissions: 0777
feature:
enableFSGroupPolicy: true
enableInlineVolume: false
kubeletDir: /var/lib/kubelet
controller:
name: csi-nfs-controller
replicas: 1
runOnMaster: false
livenessProbe:
healthPort: 29652
logLevel: 5
workingMountDir: "/tmp"
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
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"
resources:
csiProvisioner:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
node:
name: csi-nfs-node
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29653
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"

Binary file not shown.

View File

@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: v4.2.0
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: v4.2.0

View File

@ -0,0 +1,5 @@
The CSI NFS Driver is getting deployed to your cluster.
To check CSI NFS Driver pods status, please run:
kubectl --namespace={{ .Release.Namespace }} get pods --selector="app.kubernetes.io/instance={{ .Release.Name }}" --watch

View File

@ -0,0 +1,19 @@
{{/* vim: set filetype=mustache: */}}
{{/* Expand the name of the chart.*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* labels for helm resources */}}
{{- define "nfs.labels" -}}
labels:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "nfs.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 -}}

View File

@ -0,0 +1,123 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.controller.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: {{ .Values.controller.name }}
strategy:
type: {{ .Values.controller.strategyType }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.controller.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: {{ .Values.serviceAccount.controller }}
{{- with .Values.controller.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
node-role.kubernetes.io/master: ""
{{- end}}
{{- if .Values.controller.runOnControlPlane}}
node-role.kubernetes.io/control-plane: ""
{{- end}}
{{- with .Values.controller.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: csi-provisioner
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}"
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
- "--extra-create-metadata=true"
env:
- name: ADDRESS
value: /csi/csi.sock
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }}
volumeMounts:
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }}
- name: nfs
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
args:
- "--v={{ .Values.controller.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
- "--working-mount-dir={{ .Values.controller.workingMountDir }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }}
volumes:
- name: pods-mount-dir
hostPath:
path: {{ .Values.kubeletDir }}/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

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

View File

@ -0,0 +1,134 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: {{ .Values.node.name }}
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: {{ .Values.node.maxUnavailable }}
type: RollingUpdate
selector:
matchLabels:
app: {{ .Values.node.name }}
template:
metadata:
{{ include "nfs.labels" . | indent 6 }}
app: {{ .Values.node.name }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: {{ .Values.controller.dnsPolicy }}
serviceAccountName: csi-nfs-node-sa
{{- with .Values.node.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.node.nodeSelector }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.node.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: liveness-probe
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port={{ .Values.node.livenessProbe.healthPort }}
- --v=2
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources: {{- toYaml .Values.node.resources.nodeDriverRegistrar | nindent 12 }}
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}"
args :
- "--v={{ .Values.node.logLevel }}"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
- "--drivername={{ .Values.driver.name }}"
- "--mount-permissions={{ .Values.driver.mountPermissions }}"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
hostPath:
path: {{ .Values.kubeletDir }}/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: {{ .Values.kubeletDir }}/pods
type: Directory
- hostPath:
path: {{ .Values.kubeletDir }}/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,64 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-{{ .Values.rbac.name }}-node-sa
namespace: {{ .Release.Namespace }}
{{ include "nfs.labels" . | indent 2 }}
---
{{- end }}
{{ if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-external-provisioner-role
{{ include "nfs.labels" . | indent 2 }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.rbac.name }}-csi-provisioner-binding
{{ include "nfs.labels" . | indent 2 }}
subjects:
- kind: ServiceAccount
name: csi-{{ .Values.rbac.name }}-controller-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.rbac.name }}-external-provisioner-role
apiGroup: rbac.authorization.k8s.io
{{- end -}}

View File

@ -0,0 +1,116 @@
customLabels: {}
image:
nfs:
repository: registry.k8s.io/sig-storage/nfsplugin
tag: v4.2.0
pullPolicy: IfNotPresent
csiProvisioner:
repository: registry.k8s.io/sig-storage/csi-provisioner
tag: v3.3.0
pullPolicy: IfNotPresent
livenessProbe:
repository: registry.k8s.io/sig-storage/livenessprobe
tag: v2.8.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
tag: v2.6.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-nfs-controller-sa # Name of Service Account to be created or used
rbac:
create: true
name: nfs
driver:
name: nfs.csi.k8s.io
mountPermissions: 0
feature:
enableFSGroupPolicy: true
enableInlineVolume: false
kubeletDir: /var/lib/kubelet
controller:
name: csi-nfs-controller
replicas: 1
strategyType: Recreate
runOnMaster: false
runOnControlPlane: false
livenessProbe:
healthPort: 29652
logLevel: 5
workingMountDir: "/tmp"
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
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"
resources:
csiProvisioner:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
node:
name: csi-nfs-node
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
maxUnavailable: 1
logLevel: 5
livenessProbe:
healthPort: 29653
affinity: {}
nodeSelector: {}
tolerations:
- operator: "Exists"
resources:
livenessProbe:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nodeDriverRegistrar:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"

View File

@ -18,19 +18,19 @@ package main
import (
"flag"
"fmt"
"os"
"strconv"
"github.com/spf13/cobra"
"github.com/kubernetes-csi/csi-driver-nfs/pkg/nfs"
"k8s.io/klog/v2"
)
var (
endpoint string
nodeID string
perm string
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
nodeID = flag.String("nodeid", "", "node id")
mountPermissions = flag.Uint64("mount-permissions", 0777, "mounted folder permissions")
driverName = flag.String("drivername", nfs.DefaultDriverName, "name of the driver")
workingMountDir = flag.String("working-mount-dir", "/tmp", "working directory for provisioner to mount nfs shares temporarily")
)
func init() {
@ -38,49 +38,24 @@ func init() {
}
func main() {
_ = flag.CommandLine.Parse([]string{})
cmd := &cobra.Command{
Use: "NFS",
Short: "CSI based NFS driver",
Run: func(cmd *cobra.Command, args []string) {
handle()
},
}
cmd.Flags().AddGoFlagSet(flag.CommandLine)
cmd.PersistentFlags().StringVar(&nodeID, "nodeid", "", "node id")
_ = cmd.MarkPersistentFlagRequired("nodeid")
cmd.PersistentFlags().StringVar(&endpoint, "endpoint", "", "CSI endpoint")
_ = cmd.MarkPersistentFlagRequired("endpoint")
cmd.PersistentFlags().StringVar(&perm, "mount-permissions", "", "mounted folder permissions")
_ = cmd.ParseFlags(os.Args[1:])
if err := cmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "%s", err.Error())
os.Exit(1)
klog.InitFlags(nil)
flag.Parse()
if *nodeID == "" {
klog.Warning("nodeid is empty")
}
handle()
os.Exit(0)
}
func handle() {
// Converting string permission representation to *uint32
var parsedPerm *uint32
if perm != "" {
permu64, err := strconv.ParseUint(perm, 8, 32)
if err != nil {
fmt.Fprintf(os.Stderr, "Incorrect mount-permissions value: %q", perm)
os.Exit(1)
}
permu32 := uint32(permu64)
parsedPerm = &permu32
driverOptions := nfs.DriverOptions{
NodeID: *nodeID,
DriverName: *driverName,
Endpoint: *endpoint,
MountPermissions: *mountPermissions,
WorkingMountDir: *workingMountDir,
}
d := nfs.NewNFSdriver(nodeID, endpoint, parsedPerm)
d.Run()
d := nfs.NewDriver(&driverOptions)
d.Run(false)
}

View File

@ -5,7 +5,7 @@ metadata:
name: csi-nfs-controller
namespace: kube-system
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: csi-nfs-controller
@ -14,22 +14,30 @@ spec:
labels:
app: csi-nfs-controller
spec:
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
serviceAccountName: csi-nfs-controller-sa
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/os: linux # add "kubernetes.io/role: master" to run controller on master node
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
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"
containers:
- name: csi-provisioner
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.0.4
image: registry.k8s.io/sig-storage/csi-provisioner:v3.1.0
args:
- "-v=5"
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--leader-election-namespace=kube-system"
env:
- name: ADDRESS
value: /csi/csi.sock
@ -38,30 +46,28 @@ spec:
name: socket-dir
resources:
limits:
cpu: 100m
memory: 100Mi
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
- name: liveness-probe
image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0
image: registry.k8s.io/sig-storage/livenessprobe:v2.7.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29652
- --v=5
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary
image: gcr.io/k8s-staging-sig-storage/nfsplugin:canary
securityContext:
privileged: true
capabilities:
@ -79,6 +85,18 @@ spec:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29652
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
@ -87,7 +105,6 @@ spec:
name: socket-dir
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 10m

View File

@ -1,5 +1,5 @@
---
apiVersion: storage.k8s.io/v1beta1
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: nfs.csi.k8s.io
@ -7,4 +7,5 @@ spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
podInfoOnMount: true
- Ephemeral
fsGroupPolicy: File

View File

@ -1,12 +1,14 @@
---
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-nfs-node
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: csi-nfs-node
@ -16,36 +18,46 @@ spec:
app: csi-nfs-node
spec:
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
serviceAccountName: csi-nfs-node-sa
nodeSelector:
kubernetes.io/os: linux
tolerations:
- operator: "Exists"
containers:
- name: liveness-probe
image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0
image: registry.k8s.io/sig-storage/livenessprobe:v2.7.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29653
- --v=5
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "rm -rf /registration/csi-nfsplugin /registration/csi-nfsplugin-reg.sock"]
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1
args:
- --v=5
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
env:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
@ -55,13 +67,19 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: gcr.io/k8s-staging-sig-storage/nfsplugin:amd64-linux-canary
image: gcr.io/k8s-staging-sig-storage/nfsplugin:canary
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
@ -73,6 +91,18 @@ spec:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29653
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
@ -80,6 +110,12 @@ spec:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
resources:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: socket-dir
hostPath:

55
deploy/example/README.md Normal file
View File

@ -0,0 +1,55 @@
# CSI driver example
You can use NFS CSI Driver to provision Persistent Volumes statically or dynamically. Please read [Kubernetes Persistent Volumes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) for more information about Static and Dynamic provisioning.
Please refer to [driver parameters](../../docs/driver-parameters.md) for more detailed usage.
## Prerequisite
- [Set up a NFS Server on a Kubernetes cluster](./nfs-provisioner/README.md) as an example
- [Install NFS CSI Driver](../../docs/install-nfs-csi-driver.md)
## Storage Class Usage (Dynamic Provisioning)
- Create a storage class
> change `server`, `share` with your existing NFS server address and share name
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
server: nfs-server.default.svc.cluster.local
share: /
# csi.storage.k8s.io/provisioner-secret is only needed for providing mountOptions in DeleteVolume
# csi.storage.k8s.io/provisioner-secret-name: "mount-options"
# csi.storage.k8s.io/provisioner-secret-namespace: "default"
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- nconnect=8 # only supported on linux kernel version >= 5.3
- nfsvers=4.1
```
- create PVC
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pvc-nfs-csi-dynamic.yaml
```
## PV/PVC Usage (Static Provisioning)
- Follow the following command to create `PersistentVolume` and `PersistentVolumeClaim` statically.
```bash
# create PV
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pv-nfs-csi.yaml
# create PVC
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/pvc-nfs-csi-static.yaml
```
## Create a deployment
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/deployment.yaml
```

View File

@ -0,0 +1,38 @@
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: daemonset-nfs-ephemeral
spec:
selector:
matchLabels:
app: daemonset-nfs-ephemeral
template:
metadata:
labels:
app: daemonset-nfs-ephemeral
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: nginx
image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
command:
- "/bin/bash"
- "-c"
- set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts:
- name: nfs
mountPath: "/mnt/nfs"
readOnly: false
volumes:
- name: nfs
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: nfs-csi

View File

@ -0,0 +1,44 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-deployment-nfs
spec:
accessModes:
- ReadWriteMany # In this example, multiple Pods consume the same PVC.
resources:
requests:
storage: 10Gi
storageClassName: nfs-csi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-nfs
spec:
replicas: 1
selector:
matchLabels:
name: deployment-nfs
template:
metadata:
name: deployment-nfs
labels:
name: deployment-nfs
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- name: deployment-nfs
image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
command:
- "/bin/bash"
- "-c"
- set -euo pipefail; while true; do echo $(hostname) $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts:
- name: nfs
mountPath: "/mnt/nfs"
volumes:
- name: nfs
persistentVolumeClaim:
claimName: pvc-deployment-nfs

View File

@ -0,0 +1,24 @@
# fsGroup Support
[fsGroupPolicy](https://kubernetes-csi.github.io/docs/support-fsgroup.html) feature is Beta from Kubernetes 1.20, and disabled by default, follow below steps to enable this feature.
### Option#1: Enable fsGroupPolicy support in [driver helm installation](../../../charts)
add `--set feature.enableFSGroupPolicy=true` in helm installation command.
### Option#2: Enable fsGroupPolicy support on a cluster with CSI driver already installed
```console
kubectl delete CSIDriver nfs.csi.k8s.io
cat <<EOF | kubectl create -f -
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: nfs.csi.k8s.io
spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
fsGroupPolicy: File
EOF
```

View File

@ -0,0 +1,36 @@
# Set up a NFS Server on a Kubernetes cluster
After the NFS CSI Driver is deployed in your cluster, you can follow this documentation to quickly deploy some example applications. You can use NFS CSI Driver to provision Persistent Volumes statically or dynamically. Please read Kubernetes Persistent Volumes for more information about Static and Dynamic provisioning.
There are multiple different NFS servers you can use for testing of
the plugin, the major versions of the protocol v2, v3 and v4 should be supported
by the current implementation. This page will show you how to set up a NFS Server deployment on a Kubernetes cluster.
- To create a NFS provisioner on your Kubernetes cluster, run the following command.
```bash
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/nfs-provisioner/nfs-server.yaml
```
- During the deployment, a new service `nfs-server` will be created which exposes the NFS server endpoint `nfs-server.default.svc.cluster.local` and the share path `/`. You can specify `PersistentVolume` or `StorageClass` using these information.
- Deploy the NFS CSI driver, please refer to [install NFS CSI driver](../../../docs/install-nfs-csi-driver.md).
- To check if the NFS server is working, we can statically create a PersistentVolume and a PersistentVolumeClaim, and mount it onto a sample pod:
```bash
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/deploy/example/nfs-provisioner/nginx-pod.yaml
```
- Verify if the NFS server is functional, you can check the mount point from the example pod.
```bash
kubectl exec nginx-nfs-example -- bash -c "findmnt /var/www -o TARGET,SOURCE,FSTYPE"
```
- The output should look like the following:
```bash
TARGET SOURCE FSTYPE
/var/www nfs-server.default.svc.cluster.local:/ nfs4
```

View File

@ -0,0 +1,52 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-nginx
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
mountOptions:
- nfsvers=4.1
csi:
driver: nfs.csi.k8s.io
readOnly: false
volumeHandle: unique-volumeid # make sure it's a unique id in the cluster
volumeAttributes:
server: nfs-server.default.svc.cluster.local
share: /
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-nginx
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
volumeName: pv-nginx
storageClassName: ""
---
apiVersion: v1
kind: Pod
metadata:
name: nginx-nfs-example
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www
name: pvc-nginx
volumes:
- name: pvc-nginx
persistentVolumeClaim:
claimName: pvc-nginx

View File

@ -0,0 +1,26 @@
---
kind: Pod
apiVersion: v1
metadata:
name: nginx-pod-inline-volume
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
name: nginx-nfs
command:
- "/bin/bash"
- "-c"
- set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts:
- name: persistent-storage
mountPath: "/mnt/nfs"
volumes:
- name: persistent-storage
csi:
driver: nfs.csi.k8s.io
volumeAttributes:
server: nfs-server.default.svc.cluster.local # required
share: / # required
mountOptions: "nfsvers=4.1,sec=sys" # optional

View File

@ -9,8 +9,9 @@ spec:
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: nfs-csi
mountOptions:
- hard
- nconnect=8 # only supported on linux kernel version >= 5.3
- nfsvers=4.1
csi:
driver: nfs.csi.k8s.io

View File

@ -9,4 +9,4 @@ spec:
resources:
requests:
storage: 10Gi
storageClassName: nfs-csi
storageClassName: nfs-csi

View File

@ -10,4 +10,4 @@ spec:
requests:
storage: 10Gi
volumeName: pv-nfs
storageClassName: ""
storageClassName: nfs-csi

View File

@ -7,7 +7,7 @@ metadata:
app: nginx
spec:
serviceName: statefulset-nfs
replicas: 3
replicas: 1
template:
metadata:
labels:
@ -17,11 +17,11 @@ spec:
"kubernetes.io/os": linux
containers:
- name: statefulset-nfs
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
command:
- "/bin/sh"
- "/bin/bash"
- "-c"
- while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
- set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
volumeMounts:
- name: persistent-storage
mountPath: /mnt/nfs

View File

@ -0,0 +1,17 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
server: nfs-server.default.svc.cluster.local
share: /
# csi.storage.k8s.io/provisioner-secret is only needed for providing mountOptions in DeleteVolume
# csi.storage.k8s.io/provisioner-secret-name: "mount-options"
# csi.storage.k8s.io/provisioner-secret-namespace: "default"
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- nconnect=8 # only supported on linux kernel version >= 5.3
- nfsvers=4.1

View File

@ -34,7 +34,7 @@ if [ $ver != "master" ]; then
fi
echo "Installing NFS CSI driver, version: $ver ..."
kubectl apply -f $repo/rbac-csi-nfs-controller.yaml
kubectl apply -f $repo/rbac-csi-nfs.yaml
kubectl apply -f $repo/csi-nfs-driverinfo.yaml
kubectl apply -f $repo/csi-nfs-controller.yaml
kubectl apply -f $repo/csi-nfs-node.yaml

57
deploy/rbac-csi-nfs.yaml Normal file
View File

@ -0,0 +1,57 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-nfs-controller-sa
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-nfs-node-sa
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-external-provisioner-role
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-csi-provisioner-binding
subjects:
- kind: ServiceAccount
name: csi-nfs-controller-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: nfs-external-provisioner-role
apiGroup: rbac.authorization.k8s.io

View File

@ -37,5 +37,5 @@ echo "Uninstalling NFS driver, version: $ver ..."
kubectl delete -f $repo/csi-nfs-controller.yaml --ignore-not-found
kubectl delete -f $repo/csi-nfs-node.yaml --ignore-not-found
kubectl delete -f $repo/csi-nfs-driverinfo.yaml --ignore-not-found
kubectl delete -f $repo/rbac-csi-nfs-controller.yaml --ignore-not-found
kubectl delete -f $repo/rbac-csi-nfs.yaml --ignore-not-found
echo 'Uninstalled NFS driver successfully.'

View File

@ -0,0 +1,117 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-nfs-controller
namespace: kube-system
spec:
replicas: 2
selector:
matchLabels:
app: csi-nfs-controller
template:
metadata:
labels:
app: csi-nfs-controller
spec:
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: csi-nfs-controller-sa
nodeSelector:
kubernetes.io/os: linux # add "kubernetes.io/role: master" to run controller on master node
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: csi-provisioner
image: registry.k8s.io/sig-storage/csi-provisioner:v2.2.2
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- mountPath: /csi
name: socket-dir
resources:
limits:
cpu: 1
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.5.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29652
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
image: registry.k8s.io/sig-storage/nfsplugin:v3.0.0
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: IfNotPresent
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29652
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources:
limits:
cpu: 1
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

@ -0,0 +1,9 @@
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: nfs.csi.k8s.io
spec:
attachRequired: false
volumeLifecycleModes:
- Persistent

View File

@ -0,0 +1,135 @@
---
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-nfs-node
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: csi-nfs-node
template:
metadata:
labels:
app: csi-nfs-node
spec:
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/os: linux
tolerations:
- operator: "Exists"
containers:
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.5.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29653
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.4.0
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
env:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources:
limits:
cpu: 1
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: registry.k8s.io/sig-storage/nfsplugin:v3.0.0
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29653
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
resources:
limits:
cpu: 1
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,114 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-nfs-controller
namespace: kube-system
spec:
replicas: 2
selector:
matchLabels:
app: csi-nfs-controller
template:
metadata:
labels:
app: csi-nfs-controller
spec:
hostNetwork: true # controller also needs to mount nfs to create dir
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: csi-nfs-controller-sa
nodeSelector:
kubernetes.io/os: linux # add "kubernetes.io/role: master" to run controller on master node
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: csi-provisioner
image: registry.k8s.io/sig-storage/csi-provisioner:v2.2.2
args:
- "-v=2"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- mountPath: /csi
name: socket-dir
resources:
limits:
memory: 400Mi
requests:
cpu: 10m
memory: 20Mi
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.5.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29652
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
image: registry.k8s.io/sig-storage/nfsplugin:v3.1.0
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
imagePullPolicy: IfNotPresent
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29652
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
volumeMounts:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- mountPath: /csi
name: socket-dir
resources:
limits:
memory: 200Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: socket-dir
emptyDir: {}

View File

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

View File

@ -0,0 +1,132 @@
---
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
# that are necessary to run CSI nodeplugin for nfs
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-nfs-node
namespace: kube-system
spec:
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: csi-nfs-node
template:
metadata:
labels:
app: csi-nfs-node
spec:
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/os: linux
tolerations:
- operator: "Exists"
containers:
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.5.0
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=29653
- --v=2
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.4.0
args:
- --v=2
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
timeoutSeconds: 15
env:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
resources:
limits:
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
- name: nfs
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: registry.k8s.io/sig-storage/nfsplugin:v3.1.0
args:
- "-v=5"
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
ports:
- containerPort: 29653
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
resources:
limits:
memory: 300Mi
requests:
cpu: 10m
memory: 20Mi
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi-nfsplugin
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir

View File

@ -0,0 +1,52 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-nfs-controller-sa
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-external-provisioner-role
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-csi-provisioner-binding
subjects:
- kind: ServiceAccount
name: csi-nfs-controller-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: nfs-external-provisioner-role
apiGroup: rbac.authorization.k8s.io

Some files were not shown because too many files have changed in this diff Show More