Skip to content

Commit 8fcf282

Browse files
yevgeny-shnaidmank8s-ci-robot
authored andcommitted
Adding PushBuiltImage variable to MIC and MBSC objects
This flag will be used to signal whether the built object must be also push to the destination registry. The main user will be the Preflight. In the regular flow (Module) the image that is built is also always pushed. When running Preflight, user might specify whether to push the built image, or not (he wants to verify that image can be built in time, but does not want to push it right now)
1 parent ec220ed commit 8fcf282

6 files changed

+30
-0
lines changed

api/v1beta1/modulebuildsignconfig_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ type ModuleBuildSignConfigSpec struct {
5555
// ImageRepoSecret contains pull secret for the image's repo, if needed
5656
// +optional
5757
ImageRepoSecret *v1.LocalObjectReference `json:"imageRepoSecret,omitempty"`
58+
59+
// Boolean flag that determines whether images built must also
60+
// be pushed to a defined repository
61+
// +optional
62+
PushBuiltImage bool `json:"pushBuiltImage"`
5863
}
5964

6065
// BuildSignImageState contains the status of the image that was requested to be built/signed

api/v1beta1/moduleimagesconfig_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ type ModuleImagesConfigSpec struct {
7272
// ImagePullPolicy defines the pull policy used for verifying the presence of the image
7373
//+optional
7474
ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy"`
75+
76+
// Boolean flag that determines whether images built must also
77+
// be pushed to a defined repository
78+
// +optional
79+
PushBuiltImage bool `json:"pushBuiltImage"`
7580
}
7681

7782
type ModuleImageState struct {

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
@@ -250,6 +250,11 @@ spec:
250250
- kernelVersion
251251
type: object
252252
type: array
253+
pushBuiltImage:
254+
description: |-
255+
Boolean flag that determines whether images built must also
256+
be pushed to a defined repository
257+
type: boolean
253258
required:
254259
- images
255260
type: object

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
@@ -249,6 +249,11 @@ spec:
249249
- kernelVersion
250250
type: object
251251
type: array
252+
pushBuiltImage:
253+
description: |-
254+
Boolean flag that determines whether images built must also
255+
be pushed to a defined repository
256+
type: boolean
252257
type: object
253258
status:
254259
description: |-

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ spec:
250250
- kernelVersion
251251
type: object
252252
type: array
253+
pushBuiltImage:
254+
description: |-
255+
Boolean flag that determines whether images built must also
256+
be pushed to a defined repository
257+
type: boolean
253258
required:
254259
- images
255260
type: object

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ spec:
249249
- kernelVersion
250250
type: object
251251
type: array
252+
pushBuiltImage:
253+
description: |-
254+
Boolean flag that determines whether images built must also
255+
be pushed to a defined repository
256+
type: boolean
252257
type: object
253258
status:
254259
description: |-

0 commit comments

Comments
 (0)