add some basic stubs for ro volume support
This commit is contained in:
@@ -371,6 +371,11 @@ func (c *Compiler) Compile(ctx context.Context, args runtime.CompilerArgs) runti
|
|||||||
ID: id,
|
ID: id,
|
||||||
Name: id,
|
Name: id,
|
||||||
Path: k,
|
Path: k,
|
||||||
|
|
||||||
|
// TODO(bradrydzewski) the volume map does not include
|
||||||
|
// a read only flag and needs to be modified to provide
|
||||||
|
// this option.
|
||||||
|
ReadOnly: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
spec.Volumes = append(spec.Volumes, volume)
|
spec.Volumes = append(spec.Volumes, volume)
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ func toMount(source *Volume, target *VolumeMount) mount.Mount {
|
|||||||
}
|
}
|
||||||
if isBindMount(source) || isNamedPipe(source) {
|
if isBindMount(source) || isNamedPipe(source) {
|
||||||
to.Source = source.HostPath.Path
|
to.Source = source.HostPath.Path
|
||||||
|
to.ReadOnly = source.HostPath.ReadOnly
|
||||||
}
|
}
|
||||||
if isTempfs(source) {
|
if isTempfs(source) {
|
||||||
to.TmpfsOptions = &mount.TmpfsOptions{
|
to.TmpfsOptions = &mount.TmpfsOptions{
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ type (
|
|||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
|
ReadOnly bool `json:"read_only,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeDevice describes a mapping of a raw block
|
// VolumeDevice describes a mapping of a raw block
|
||||||
|
|||||||
Reference in New Issue
Block a user