-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Critical
-
Component/s: kubernetes-plugin
When I use the persistent volume claim of kubernetes plugin and set read-only, readonly is now set under volumes, which should be under volumemounts. This will cause the actually mounted directory to still be written to or even deleted, which is dangerous
-----------------------------------
expect:
-----------------------------------
...
  volumeMounts:
  - mountPath: "/tools"
   name: "volume-1"
   readOnly: true
...
 volumes:
 - name: "volume-1"
  persistentVolumeClaim:
   claimName: "jenkins-tools-pvc"
...
-----------------------------------
actual (This is wrong):
-----------------------------------
...
  volumeMounts:
  - mountPath: "/tools"
   name: "volume-1"
   readOnly: false
...
 volumes:
 - name: "volume-1"
  persistentVolumeClaim:
   claimName: "jenkins-tools-pvc"
   readOnly: true
...