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

add the fields for signing to crd #91

Merged
merged 1 commit into from Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions api/v1beta1/module_types.go
Expand Up @@ -81,6 +81,22 @@ type Build struct {
KanikoParams *KanikoParams `json:"kanikoParams,omitempty"`
}

type Sign struct {
// +optional
// Image to sign, ignored if a Build is present, required otherwise
UnsignedImage string `json:"unsignedImage,omitempty"`

// a secret containing the private key used to sign kernel modules for secureboot
KeySecret *v1.LocalObjectReference `json:"keySecret"`

// a secret containing the public key used to sign kernel modules for secureboot
CertSecret *v1.LocalObjectReference `json:"certSecret"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a public key for signing purposes?


// +optional
// paths inside the image for the kernel modules to sign (if ommited all kmods are signed)
FilesToSign []string `json:"filesToSign,omitempty"`
}

// KernelMapping pairs kernel versions with a DriverContainer image.
// Kernel versions can be matched literally or using a regular expression.
type KernelMapping struct {
Expand All @@ -89,6 +105,10 @@ type KernelMapping struct {
// Build enables in-cluster builds for this mapping and allows overriding the Module's build settings.
Build *Build `json:"build"`

// +optional
// Sign enables in-cluster signing for this mapping
Sign *Sign `json:"sign,omitempty"`

// ContainerImage is the name of the DriverContainer image that should be used to deploy the module.
ContainerImage string `json:"containerImage"`

Expand Down Expand Up @@ -152,6 +172,10 @@ type ModuleLoaderContainerSpec struct {
// +optional
Build *Build `json:"build,omitempty"`

// +optional
// Sign provides default kmod signing settings
Sign *Sign `json:"sign,omitempty"`

// ContainerImage is a top-level field
// +optional
ContainerImage string `json:"containerImage,omitempty"`
Expand Down
40 changes: 40 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.