k6-operator
k6-operator copied to clipboard
Add ReadOnly option to volumeMount in Pods
Added ReadOnly to the volumeMount option in Pods to support mounting of ReadOnlyMany(ROX) PVC. https://github.com/grafana/k6-operator/issues/279
The default is ReadOnly: false. The reason was to avoid destructive changes, considering the possibility that some users may already be writing to the volume in the init container.
Here are the results of a simple test. files.zip
Test Contents
- kubectl apply -f pvc.yaml to create pods to add pods and scenarios
- kubectl exec -it vp -- /bin/bash to add main.js to /mnt/vp in pods
- Create TestRun with kubectl apply -f main.yaml
result describe-log.txt and get-log.txt are the execution results. You can confirm that ReadOnly for k6-test-volume is true.