Merge pull request #1307 from erinboyd/raw-block-3
Automatic merge from submit-queue. add readOnly use case to raw block device proposal This PR is an addendum to the #1265 to dictate the behavior of the container runtime for read-only devices as specified in the PVCVolumeSource. The precedence already exists for filesystems thus having a consistent behavior for the user. UC9 was added to illustrate the usage.
This commit is contained in:
commit
58178da5a3
|
@ -528,6 +528,37 @@ spec:
|
|||
name: my-nginx-data
|
||||
readOnly: false
|
||||
```
|
||||
## UC9:
|
||||
|
||||
DESCRIPTION:
|
||||
* A user wishes to read data from a read-only raw block device, an example might be a database for analytics processing.
|
||||
|
||||
USER:
|
||||
* User creates pod and specifies 'readOnly' as a parameter in the persistent volume claim to indicate they would
|
||||
like to be bound to a PV with this setting enabled.
|
||||
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx-pod-block-001
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-container
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeDevices:
|
||||
- name: data
|
||||
devicePath: /dev/xvda
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: block-pvc001
|
||||
readOnly: true #flag indicating read-only for container runtime
|
||||
```
|
||||
*** Note: the readOnly field already exists in the PersistentVolumeClaimVolumeSource above and will dictate the values set by the container runtime options ***
|
||||
|
||||
|
||||
# Container Runtime considerations
|
||||
It is important the values that are passed to the container runtimes are valid and support the current implementation of these various runtimes. Listed below are a table of various runtime and the mapping of their values to what is passed from the kubelet.
|
||||
|
@ -734,4 +765,4 @@ Feature: Discovery of block devices
|
|||
|
||||
Milestone 3: Plugin changes with dynamic provisioning support (GCE, AWS & GlusterFS)
|
||||
|
||||
Milestone 4: Flex volume update
|
||||
Milestone 4: Flex volume update
|
||||
|
|
Loading…
Reference in New Issue