Skip to content

Commit 97da858

Browse files
ybettank8s-ci-robot
authored andcommitted
Updating the PreflightValidation documentation.
Some statuses has been updated while transitioning to the container-runtime implementation. Signed-off-by: Yoni Bettan <[email protected]>
1 parent b43d4a8 commit 97da858

File tree

1 file changed

+11
-52
lines changed

1 file changed

+11
-52
lines changed

docs/mkdocs/documentation/preflight_validation.md

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ A `PreflightValidation` resource will report that status and progress of each mo
3636
tried to validate in its `.status.modules` list.
3737
Elements of that list contain the following fields:
3838

39-
#### `lastTransitionTime`
40-
41-
The last time when the `Module` status transitioned from one status to another.
42-
This should be when the underlying status changed.
43-
If that is not known, then using the time when the API field changed is acceptable.
44-
4539
#### `name`
4640

4741
The name of the `Module` resource.
@@ -50,72 +44,37 @@ The name of the `Module` resource.
5044

5145
The namespace of the `Module` resource.
5246

53-
#### `statusReason`
47+
#### `CRBaseStatus.statusReason`
5448

5549
A string describing the status source.
5650

57-
#### `verificationStage`
51+
#### `CRBaseStatus.verificationStage`
5852

5953
The current stage of the verification process, either:
6054

61-
- `image` (image existence verification), or;
62-
- `build` (build process verification), or;
63-
- `sign` (sign process verification), or;
55+
- `Image` (image existence verification), or;
56+
- `Done` (verification is done)
6457

65-
#### `verificationStatus`
58+
#### `CRBaseStatus.verificationStatus`
6659

6760
The status of the `Module` verification, either:
6861

69-
- `true` (verified), or;
70-
- `false` (verification failed), or;
71-
- `error` (error during the verification process), or;
72-
- `unknown` (verification has not started yet).
73-
74-
## Preflight validation stages per Module
75-
76-
On every KMM Module present in the cluster, preflight will run the following validations:
77-
78-
1. [Image validation](#Image-validation-stage)
79-
2. [Build validation](#Build-validation-stage)
80-
3. [Sign validation](#Sign-validation-stage)
62+
- `Success` (verified), or;
63+
- `Failure` (verification failed), or;
64+
- `InProgress` (verification is in-progress).
8165

8266
### Image validation stage
8367

8468
Image validation is always the first stage of the preflight validation that is being executed.
8569
In case image validation is successful, no other validations will be run on that specific module.
86-
Image validation consists of 2 stages:
70+
The operator will check, using the container-runtime, the image existence and accessibility for the updaded kernel in the module.
8771

88-
1. image existence and accessibility. The code tries to access the image defined for the upgraded kernel in the module,
89-
and get its manifests.
90-
2. verify the presence of the kernel module defined in the `Module` in the correct path for future `modprobe` execution.
91-
If this validation is successful, it probably means that the kernel module was compiled with the correct linux
92-
headers.
93-
The correct path is `<DirName>/lib/modules/<UpgradedKernel>/`.
94-
95-
### Build validation stage
96-
97-
Build validation is executed only in case image validation has failed, and there is a `build` section in the `Module`
98-
that is relevant for the upgraded kernel.
99-
Build validation will try to run build pod and validate that it finishes successfully.
72+
If the image validation has failed, and there is a `build`/`sign` section in the `Module` that is relevant for the upgraded kernel,
73+
the controller will try to build and/or sign the image.
10074
If the `PushBuiltImage` flag is defined in the `PreflightValidation` CR, it will also try to push the resulting image
10175
into its repo.
10276
The resulting image name is taken from the definition of the `containerImage` field of the `Module` CR.
10377

104-
!!! note
105-
If the `sign` section is defined for the upgraded kernel, then the resulting image will not be `containerImage`
106-
field of the `Module` CR, but a temporary image name, since the resulting image should be the product of Sign flow.
107-
108-
### Sign validation stage
109-
110-
Sign validation is executed only in case image validation has failed, there is a `sign` section in the `Module` that is
111-
relevant for the upgrade kernel, and build validation finished successfully in case there was a `build` section in the
112-
`Module` relevant for the upgraded kernel.
113-
Sign validation will try to run the sign pod and validate that it finishes successfully.
114-
In case the `PushBuiltImage` flag is defined in the `PreflightValidation` CR, it will also try to push the resulting
115-
image to its registry.
116-
The result image is always the image defined in the `ContainerImage` field of the `Module`.
117-
The input image is either the output of the Build stage, or an image defined in the `UnsignedImage` field.
118-
11978
!!! note
12079
In case a `build` section exists, the `sign` section input image is the `build` section's output image.
12180
Therefore, in order for the input image to be available for the `sign` section, the `PushBuiltImage` flag must be

0 commit comments

Comments
 (0)