Skip to content

Commit

Permalink
cherry-pick PR 312 (9f6455) - adds file:// endpoint documentation
Browse files Browse the repository at this point in the history
Cherry Pick of PR #312 (9f6455)

Adds documentation explaining that file:/// endpoint is strictly for debugging in non-containerized run times.
  • Loading branch information
copejon committed Aug 14, 2018
2 parents b688e64 + 85339b2 commit e6093ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Supported file formats are:
- A running Kubernetes cluster with roles and role bindings implementing security necesary for the CDI controller to watch PVCs and pods across all namespaces.
- A storage class and provisioner.
- An HTTP or S3 file server hosting VM images
> Note: CDI is able to import a local file endpoint but this is not supported except for testing and debugging.
`file:///` endpoints can only access the container's filesystem and require that files on the host be mounted via hostPath to the impoter pod. This bind-mount is **not** done by CDI.

- An optional "golden" namespace acting as the image registry. The `default` namespace is fine for tire kicking.

### Download CDI
Expand Down
1 change: 1 addition & 0 deletions pkg/importer/dataStream.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func (d dataStream) http() (io.ReadCloser, error) {

func (d dataStream) local() (io.ReadCloser, error) {
fn := d.Url.Path
glog.Warning("the file:/// protocol is intended *only* for debugging and testing. Files outside of the container cannot be accessed.")
f, err := os.Open(fn)
if err != nil {
return nil, errors.Wrapf(err, "could not open file %q", fn)
Expand Down

0 comments on commit e6093ee

Please sign in to comment.