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:
Matej Vašek 2025-04-03 12:19:05 +02:00 committed by GitHub
parent fc750a283a
commit aae2683231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 10 deletions

View File

@ -150,12 +150,14 @@ type BuildSpec struct {
Image string `yaml:"-"`
// 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 {
Source string `yaml:"source"`
Destination string `yaml:"destination"`
// Path on the local machine
Source string `yaml:"hostPath"`
// Path in the build container
Destination string `yaml:"path"`
}
// RunSpec

View File

@ -49,7 +49,7 @@
"type": "string",
"description": "RemoteStorageClass specifies the storage class to use for the volume used\non-cluster during when built remotely."
},
"mounts": {
"volumes": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/MountSpec"
@ -279,15 +279,17 @@
},
"MountSpec": {
"required": [
"source",
"destination"
"hostPath",
"path"
],
"properties": {
"source": {
"type": "string"
"hostPath": {
"type": "string",
"description": "Path on the local machine"
},
"destination": {
"type": "string"
"path": {
"type": "string",
"description": "Path in the build container"
}
},
"additionalProperties": false,