mirror of https://github.com/knative/func.git
Make build binds more similar to runtime binds (#2768)
* Make build binds more similar to runtime binds Signed-off-by: Matej Vašek <mvasek@redhat.com> * Added comments on struct Signed-off-by: Matej Vašek <mvasek@redhat.com> --------- Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
parent
fc750a283a
commit
aae2683231
|
@ -150,12 +150,14 @@ type BuildSpec struct {
|
||||||
Image string `yaml:"-"`
|
Image string `yaml:"-"`
|
||||||
|
|
||||||
// Mounts used in build phase. This is useful in particular for paketo bindings.
|
// Mounts used in build phase. This is useful in particular for paketo bindings.
|
||||||
Mounts []MountSpec `yaml:"mounts,omitempty"`
|
Mounts []MountSpec `yaml:"volumes,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MountSpec struct {
|
type MountSpec struct {
|
||||||
Source string `yaml:"source"`
|
// Path on the local machine
|
||||||
Destination string `yaml:"destination"`
|
Source string `yaml:"hostPath"`
|
||||||
|
// Path in the build container
|
||||||
|
Destination string `yaml:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunSpec
|
// RunSpec
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "RemoteStorageClass specifies the storage class to use for the volume used\non-cluster during when built remotely."
|
"description": "RemoteStorageClass specifies the storage class to use for the volume used\non-cluster during when built remotely."
|
||||||
},
|
},
|
||||||
"mounts": {
|
"volumes": {
|
||||||
"items": {
|
"items": {
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
"$ref": "#/definitions/MountSpec"
|
"$ref": "#/definitions/MountSpec"
|
||||||
|
@ -279,15 +279,17 @@
|
||||||
},
|
},
|
||||||
"MountSpec": {
|
"MountSpec": {
|
||||||
"required": [
|
"required": [
|
||||||
"source",
|
"hostPath",
|
||||||
"destination"
|
"path"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"source": {
|
"hostPath": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "Path on the local machine"
|
||||||
},
|
},
|
||||||
"destination": {
|
"path": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "Path in the build container"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|
Loading…
Reference in New Issue