-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: single PV mounted on multiple pods as read-only erroring (#99)
* fix: two pods reading from same read-only volume fails * refactor: remove redundant code * refactor: remove debug code * refactor: remove arch specific go flags * refactor: remove debug code * refactor: remove extra newline * refactor: remove debug code changes * fix: refactor `run_test_job` to accept multiple jobs - to fix failing test in CI/CD (one of the manifests has multiple job templates) * test: fix typo for job name
- Loading branch information
1 parent
ac6f2dd
commit 6061d3a
Showing
5 changed files
with
116 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION ?= v0.8.1 | ||
VERSION ?= v0.8.2 | ||
|
||
IMAGE_BUILDER ?= docker | ||
IMAGE_BUILD_CMD ?= buildx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: pv-test-multi-read-simple-fs | ||
spec: | ||
storageClassName: csi-image.warm-metal.tech | ||
capacity: | ||
storage: 5Mi | ||
accessModes: | ||
- ReadOnlyMany # does not force volume to be mounted read only | ||
persistentVolumeReclaimPolicy: Delete | ||
csi: | ||
driver: csi-image.warm-metal.tech | ||
volumeHandle: "docker.io/warmmetal/csi-image-test:simple-fs" | ||
volumeAttributes: | ||
pullAlways: "true" | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: pv-test-multi-read-simple-fs | ||
spec: | ||
storageClassName: csi-image.warm-metal.tech | ||
accessModes: | ||
- ReadOnlyMany | ||
resources: | ||
requests: | ||
storage: 5Mi | ||
volumeName: pv-test-multi-read-simple-fs | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: two-ro-single-pv-read-only-true | ||
spec: | ||
template: | ||
metadata: | ||
name: two-ro-single-pv-read-only-true | ||
spec: | ||
containers: | ||
- name: two-ro-single-pv-read-only-true | ||
image: docker.io/warmmetal/csi-image-test:check-fs | ||
env: | ||
- name: TARGET | ||
value: /target1 | ||
- name: CHECK_RO | ||
value: "true" | ||
volumeMounts: | ||
- mountPath: /target1 | ||
readOnly: true | ||
name: target1 | ||
restartPolicy: Never | ||
volumes: | ||
- name: target1 | ||
persistentVolumeClaim: | ||
claimName: pv-test-multi-read-simple-fs | ||
backoffLimit: 0 | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: two-ro-single-pv-read-only-false | ||
spec: | ||
template: | ||
metadata: | ||
name: two-ro-single-pv-read-only-false | ||
spec: | ||
containers: | ||
- name: two-ro-single-pv-read-only-false | ||
image: docker.io/warmmetal/csi-image-test:check-fs | ||
env: | ||
- name: TARGET | ||
value: /target1 | ||
- name: CHECK_RO | ||
value: "true" | ||
volumeMounts: | ||
- mountPath: /target1 | ||
name: target1 | ||
restartPolicy: Never | ||
volumes: | ||
- name: target1 | ||
persistentVolumeClaim: | ||
claimName: pv-test-multi-read-simple-fs | ||
backoffLimit: 0 |