Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11240,6 +11240,34 @@
}
}
},
"k8s.io.api.core.v1.HostPathVolumeSource": {
"description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
"type": "string",
"default": ""
},
"type": {
"description": "type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n\nPossible enum values:\n - `\"\"` For backwards compatible, leave it empty if unset\n - `\"BlockDevice\"` A block device must exist at the given path\n - `\"CharDevice\"` A character device must exist at the given path\n - `\"Directory\"` A directory must exist at the given path\n - `\"DirectoryOrCreate\"` If nothing exists at the given path, an empty directory will be created there as needed with file mode 0755, having the same group and ownership with Kubelet.\n - `\"File\"` A file must exist at the given path\n - `\"FileOrCreate\"` If nothing exists at the given path, an empty file will be created there as needed with file mode 0644, having the same group and ownership with Kubelet.\n - `\"Socket\"` A UNIX socket must exist at the given path",
"type": "string",
"enum": [
"",
"BlockDevice",
"CharDevice",
"Directory",
"DirectoryOrCreate",
"File",
"FileOrCreate",
"Socket"
]
}
}
},
"k8s.io.api.core.v1.LocalObjectReference": {
"description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.",
"type": "object",
Expand Down Expand Up @@ -15250,6 +15278,36 @@
}
}
},
"v1.OverlayVolumeSource": {
"description": "OverlayVolumeSource represents a qcow2 overlay volume with a backing source. The overlay provides copy-on-write semantics on top of the backing source.",
"type": "object",
"properties": {
"backingFormat": {
"description": "BackingFormat specifies the format of the backing image (raw or qcow2). Defaults to raw if not specified.",
"type": "string"
},
"backingHostPath": {
"description": "BackingHostPath represents a pre-existing host file or directory used as the backing source.",
"$ref": "#/definitions/k8s.io.api.core.v1.HostPathVolumeSource"
},
"backingPVC": {
"description": "BackingPVC is a reference to a PersistentVolumeClaim used as the backing (read-only) source.",
"$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource"
},
"persistent": {
"description": "Persistent indicates whether the overlay should be kept across VM restarts. If false, the overlay is deleted when the VM stops. Defaults to false.",
"type": "boolean"
},
"targetHostPath": {
"description": "TargetHostPath specifies where to place the overlay file on the host. If empty, defaults to node-local storage (/var/run/kubevirt-private/overlay-disks).",
"$ref": "#/definitions/k8s.io.api.core.v1.HostPathVolumeSource"
},
"targetPVC": {
"description": "TargetPVC specifies a PersistentVolumeClaim where the overlay should be stored. If specified, the overlay will be persisted to this PVC instead of node-local storage.",
"$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource"
}
}
},
"v1.PITTimer": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -17838,6 +17896,10 @@
"type": "string",
"default": ""
},
"overlay": {
"description": "Overlay represents a qcow2 overlay volume with explicit backing and target sources. Provides copy-on-write semantics with more control than ephemeral volumes.",
"$ref": "#/definitions/v1.OverlayVolumeSource"
},
"persistentVolumeClaim": {
"description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
"$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource"
Expand Down
8 changes: 7 additions & 1 deletion pkg/ephemeral-disk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "go_default_library",
srcs = ["ephemeral-disk.go"],
srcs = [
"ephemeral-disk.go",
"overlay-disk-handler.go",
],
importpath = "kubevirt.io/kubevirt/pkg/ephemeral-disk",
visibility = ["//visibility:public"],
deps = [
Expand All @@ -18,14 +21,17 @@ go_test(
srcs = [
"ephemeral-disk_suite_test.go",
"ephemeral-disk_test.go",
"overlay-disk-handler_test.go",
],
embed = [":go_default_library"],
deps = [
"//pkg/ephemeral-disk-utils:go_default_library",
"//pkg/libvmi:go_default_library",
"//pkg/virt-launcher/virtwrap/api:go_default_library",
"//staging/src/kubevirt.io/api/core/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/testutils:go_default_library",
"//vendor/github.com/onsi/ginkgo/v2:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
],
)
Loading