Skip to content

Commit afc51f4

Browse files
yevgeny-shnaidmank8s-ci-robot
authored andcommitted
Change Preflight VerifactionStatus and VerifactionStage definitions
Since preflight is moving to MIC/MBSC implementation, the preflight implementation is also changing. MIC is taking over all the handling of build/sign and image verification, so we only need one stage: Image, and the status is now becoming InProgress/Success/Failure
1 parent bc652cb commit afc51f4

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

api/v1beta1/preflightvalidation_types.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ import (
2525
)
2626

2727
const (
28-
VerificationTrue = v1beta2.VerificationTrue
29-
VerificationFalse = v1beta2.VerificationFalse
30-
VerificationStageImage = v1beta2.VerificationStageImage
31-
VerificationStageBuild = v1beta2.VerificationStageBuild
32-
VerificationStageSign = v1beta2.VerificationStageSign
33-
VerificationStageRequeued = v1beta2.VerificationStageRequeued
34-
VerificationStageDone = v1beta2.VerificationStageDone
28+
VerificationSuccess = v1beta2.VerificationSuccess
29+
VerificationFailure = v1beta2.VerificationFailure
30+
VerificationInProgress = v1beta2.VerificationInProgress
31+
VerificationStageImage = v1beta2.VerificationStageImage
32+
VerificationStageDone = v1beta2.VerificationStageDone
3533
)
3634

3735
// PreflightValidationSpec describes the desired state of the resource, such as the kernel version

api/v1beta2/preflightvalidation_types.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ import (
2121
)
2222

2323
const (
24-
VerificationTrue string = "True"
25-
VerificationFalse string = "False"
26-
VerificationStageImage string = "Image"
27-
VerificationStageBuild string = "Build"
28-
VerificationStageSign string = "Sign"
29-
VerificationStageRequeued string = "Requeued"
30-
VerificationStageDone string = "Done"
24+
VerificationSuccess string = "Success"
25+
VerificationFailure string = "Failure"
26+
VerificationInProgress string = "InProgress"
27+
VerificationStageImage string = "Image"
28+
VerificationStageDone string = "Done"
3129
)
3230

3331
// PreflightValidationSpec describes the desired state of the resource, such as the kernel version
@@ -50,7 +48,7 @@ type CRBaseStatus struct {
5048
// error (error during verification process), unknown (verification has not started yet)
5149
// +required
5250
// +kubebuilder:validation:Required
53-
// +kubebuilder:validation:Enum=True;False
51+
// +kubebuilder:validation:Enum=Success;Failure;InProgress
5452
VerificationStatus string `json:"verificationStatus"`
5553

5654
// StatusReason contains a string describing the status source.
@@ -61,7 +59,7 @@ type CRBaseStatus struct {
6159
// image (image existence verification), build(build process verification)
6260
// +required
6361
// +kubebuilder:validation:Required
64-
// +kubebuilder:validation:Enum=Image;Build;Sign;Requeued;Done
62+
// +kubebuilder:validation:Enum=Image;Done
6563
VerificationStage string `json:"verificationStage"`
6664

6765
// LastTransitionTime is the last time the CR status transitioned from one status to another.

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,16 @@ spec:
8383
image (image existence verification), build(build process verification)
8484
enum:
8585
- Image
86-
- Build
87-
- Sign
88-
- Requeued
8986
- Done
9087
type: string
9188
verificationStatus:
9289
description: |-
9390
Status of Module CR verification: true (verified), false (verification failed),
9491
error (error during verification process), unknown (verification has not started yet)
9592
enum:
96-
- "True"
97-
- "False"
93+
- Success
94+
- Failure
95+
- InProgress
9896
type: string
9997
required:
10098
- lastTransitionTime
@@ -186,18 +184,16 @@ spec:
186184
image (image existence verification), build(build process verification)
187185
enum:
188186
- Image
189-
- Build
190-
- Sign
191-
- Requeued
192187
- Done
193188
type: string
194189
verificationStatus:
195190
description: |-
196191
Status of Module CR verification: true (verified), false (verification failed),
197192
error (error during verification process), unknown (verification has not started yet)
198193
enum:
199-
- "True"
200-
- "False"
194+
- Success
195+
- Failure
196+
- InProgress
201197
type: string
202198
required:
203199
- lastTransitionTime

0 commit comments

Comments
 (0)