Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add kernelVersion and osVersion to microvm #2

Merged
merged 1 commit into from
May 24, 2023
Merged
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
18 changes: 16 additions & 2 deletions types/microvm/microvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ type VMSpec struct {
MemoryMb int64 `json:"memoryMb"`

// RootVolume specifies the volume to use for the root of the microvm.
// +kubebuilder:validation:Required
// +optional
Skarlso marked this conversation as resolved.
Show resolved Hide resolved
RootVolume Volume `json:"rootVolume"`

// AdditionalVolumes specifies additional non-root volumes to attach to the microvm.
// +optional
AdditionalVolumes []Volume `json:"volumes,omitempty"`

// Kernel specifies the kernel and its arguments to use.
// +kubebuilder:validation:Required
// +optional
Kernel ContainerFileSource `json:"kernel"`

// KernelCmdLine are the additional args to use for the kernel cmdline.
Expand All @@ -58,6 +58,20 @@ type VMSpec struct {
// Labels allow you to include extra data on the Microvm
// +optional
Labels map[string]string `json:"labels"`

// KernelVersion is an optional short syntax to supply kernel image information.
// If provided, capmvm will fill in the appropriate fields with the default
// settings for that version.
// This value will override any other kernel image arguments.
// +optional
KernelVersion string `json:"kernelVersion"`

// OsVersion is an optional short syntax to supply root volume information.
// If provided, capmvm will fill in the appropriate fields with the default
// settings for that version.
// This value will override any other root volume arguments.
// +optional
OsVersion string `json:"osVersion"`
}

// ContainerFileSource represents a file coming from a container image.
Expand Down