Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/v1beta1/moduleimagesconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ type ModuleImageSpec struct {
// Sign contains sign instructions, in case image needs signing
// +optional
Sign *Sign `json:"sign,omitempty"`

// +optional
// RegistryTLS set the TLS configs for accessing the registry of the image.
RegistryTLS *TLSOptions `json:"registryTLS,omitempty"`
}

// ModuleImagesConfigSpec describes the images of the Module whose status needs to be verified
Expand Down
5 changes: 5 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.

13 changes: 13 additions & 0 deletions config/crd/bases/kmm.sigs.x-k8s.io_modulebuildsignconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ spec:
kernelVersion:
description: kernel version for which this image is targeted
type: string
registryTLS:
description: RegistryTLS set the TLS configs for accessing the
registry of the image.
properties:
insecure:
description: If Insecure is true, the operator will be able
to access a registry in an insecure (plain HTTP) protocol.
type: boolean
insecureSkipTLSVerify:
description: If InsecureSkipTLSVerify, the operator will
accept any certificate provided by the registry.
type: boolean
type: object
sign:
description: Sign contains sign instructions, in case image
needs signing
Expand Down
13 changes: 13 additions & 0 deletions config/crd/bases/kmm.sigs.x-k8s.io_moduleimagesconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,19 @@ spec:
kernelVersion:
description: kernel version for which this image is targeted
type: string
registryTLS:
description: RegistryTLS set the TLS configs for accessing the
registry of the image.
properties:
insecure:
description: If Insecure is true, the operator will be able
to access a registry in an insecure (plain HTTP) protocol.
type: boolean
insecureSkipTLSVerify:
description: If InsecureSkipTLSVerify, the operator will
accept any certificate provided by the registry.
type: boolean
type: object
sign:
description: Sign contains sign instructions, in case image
needs signing
Expand Down
1 change: 1 addition & 0 deletions internal/controllers/module_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ func (mrh *moduleReconcilerHelper) handleMIC(ctx context.Context, mod *kmmv1beta
KernelVersion: mld.KernelVersion,
Build: mld.Build,
Sign: mld.Sign,
RegistryTLS: mld.RegistryTLS,
}
images = append(images, mis)
}
Expand Down
2 changes: 2 additions & 0 deletions internal/controllers/module_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,14 @@ var _ = Describe("handleMIC", func() {
Build: &kmmv1beta1.Build{},
Sign: &kmmv1beta1.Sign{},
KernelVersion: "some version",
RegistryTLS: &kmmv1beta1.TLSOptions{},
}
expectedSpec := kmmv1beta1.ModuleImageSpec{
Image: img,
KernelVersion: "some version",
Build: mld.Build,
Sign: mld.Sign,
RegistryTLS: mld.RegistryTLS,
}
mockKernelMapper.EXPECT().GetModuleLoaderDataForKernel(mod, gomock.Any()).Return(mld, nil)
mockMICAPI.EXPECT().CreateOrPatch(ctx, mod.Name, mod.Namespace, []kmmv1beta1.ModuleImageSpec{expectedSpec}, mod.Spec.ImageRepoSecret, mod).Return(nil)
Expand Down
Loading