Skip to content

Commit 69bf011

Browse files
TomerNewmank8s-ci-robot
authored andcommitted
Introducing DockerfileOCIArtifact field to Module CRD.
As part of transitioning our builds to Shipwright using OCIArtifacts instead of pods running the Kaniko container, we need to allow users to specify the registry and artifact that contain the Dockerfile used for building the kernel module image. The DockerfileOCIArtifact field will remain optional for now, until the migration to Shipwright is complete.
1 parent 2740ffe commit 69bf011

8 files changed

+55
-0
lines changed

api/v1beta1/module_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ type Build struct {
5252
// ConfigMap that holds Dockerfile contents
5353
DockerfileConfigMap *v1.LocalObjectReference `json:"dockerfileConfigMap"`
5454

55+
// +optional
56+
// DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
57+
// used to build the kernel module container image.
58+
DockerfileOCIArtifact string `json:"dockerfileOCIArtifact"`
59+
5560
// +optional
5661
// BaseImageRegistryTLS contains settings determining how to access registries of the base images in the build-process' Dockerfile.
5762
BaseImageRegistryTLS TLSOptions `json:"baseImageRegistryTLS,omitempty"`

config/crd-hub/bases/hub.kmm.sigs.x-k8s.io_managedclustermodules.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,6 +2521,11 @@ spec:
25212521
type: string
25222522
type: object
25232523
x-kubernetes-map-type: atomic
2524+
dockerfileOCIArtifact:
2525+
description: |-
2526+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2527+
used to build the kernel module container image.
2528+
type: string
25242529
kanikoParams:
25252530
description: KanikoParams is used to customize the
25262531
building process of the image.
@@ -2648,6 +2653,11 @@ spec:
26482653
type: string
26492654
type: object
26502655
x-kubernetes-map-type: atomic
2656+
dockerfileOCIArtifact:
2657+
description: |-
2658+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2659+
used to build the kernel module container image.
2660+
type: string
26512661
kanikoParams:
26522662
description: KanikoParams is used to customize
26532663
the building process of the image.

config/crd-hub/bases/kmm.sigs.x-k8s.io_modulebuildsignconfigs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ spec:
118118
type: string
119119
type: object
120120
x-kubernetes-map-type: atomic
121+
dockerfileOCIArtifact:
122+
description: |-
123+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
124+
used to build the kernel module container image.
125+
type: string
121126
kanikoParams:
122127
description: KanikoParams is used to customize the building
123128
process of the image.

config/crd-hub/bases/kmm.sigs.x-k8s.io_moduleimagesconfigs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ spec:
118118
type: string
119119
type: object
120120
x-kubernetes-map-type: atomic
121+
dockerfileOCIArtifact:
122+
description: |-
123+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
124+
used to build the kernel module container image.
125+
type: string
121126
kanikoParams:
122127
description: KanikoParams is used to customize the building
123128
process of the image.

config/crd-hub/bases/kmm.sigs.x-k8s.io_modules.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,11 @@ spec:
25022502
type: string
25032503
type: object
25042504
x-kubernetes-map-type: atomic
2505+
dockerfileOCIArtifact:
2506+
description: |-
2507+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2508+
used to build the kernel module container image.
2509+
type: string
25052510
kanikoParams:
25062511
description: KanikoParams is used to customize the building
25072512
process of the image.
@@ -2626,6 +2631,11 @@ spec:
26262631
type: string
26272632
type: object
26282633
x-kubernetes-map-type: atomic
2634+
dockerfileOCIArtifact:
2635+
description: |-
2636+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2637+
used to build the kernel module container image.
2638+
type: string
26292639
kanikoParams:
26302640
description: KanikoParams is used to customize the
26312641
building process of the image.

config/crd/bases/kmm.sigs.x-k8s.io_modulebuildsignconfigs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ spec:
118118
type: string
119119
type: object
120120
x-kubernetes-map-type: atomic
121+
dockerfileOCIArtifact:
122+
description: |-
123+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
124+
used to build the kernel module container image.
125+
type: string
121126
kanikoParams:
122127
description: KanikoParams is used to customize the building
123128
process of the image.

config/crd/bases/kmm.sigs.x-k8s.io_moduleimagesconfigs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ spec:
118118
type: string
119119
type: object
120120
x-kubernetes-map-type: atomic
121+
dockerfileOCIArtifact:
122+
description: |-
123+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
124+
used to build the kernel module container image.
125+
type: string
121126
kanikoParams:
122127
description: KanikoParams is used to customize the building
123128
process of the image.

config/crd/bases/kmm.sigs.x-k8s.io_modules.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,11 @@ spec:
25022502
type: string
25032503
type: object
25042504
x-kubernetes-map-type: atomic
2505+
dockerfileOCIArtifact:
2506+
description: |-
2507+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2508+
used to build the kernel module container image.
2509+
type: string
25052510
kanikoParams:
25062511
description: KanikoParams is used to customize the building
25072512
process of the image.
@@ -2626,6 +2631,11 @@ spec:
26262631
type: string
26272632
type: object
26282633
x-kubernetes-map-type: atomic
2634+
dockerfileOCIArtifact:
2635+
description: |-
2636+
DockerfileOCIArtifact specifies an OCI artifact that contains the dockerfile
2637+
used to build the kernel module container image.
2638+
type: string
26292639
kanikoParams:
26302640
description: KanikoParams is used to customize the
26312641
building process of the image.

0 commit comments

Comments
 (0)