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,
|
||||
Name: id,
|
||||
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)
|
||||
|
||||
@@ -220,6 +220,7 @@ func toMount(source *Volume, target *VolumeMount) mount.Mount {
|
||||
}
|
||||
if isBindMount(source) || isNamedPipe(source) {
|
||||
to.Source = source.HostPath.Path
|
||||
to.ReadOnly = source.HostPath.ReadOnly
|
||||
}
|
||||
if isTempfs(source) {
|
||||
to.TmpfsOptions = &mount.TmpfsOptions{
|
||||
|
||||
@@ -101,10 +101,11 @@ type (
|
||||
// VolumeHostPath mounts a file or directory from the
|
||||
// host node's filesystem into your container.
|
||||
VolumeHostPath struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
ReadOnly bool `json:"read_only,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeDevice describes a mapping of a raw block
|
||||
|
||||
Reference in New Issue
Block a user