You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2024. It is now read-only.
operator: revise deployment status API and operator reconcile loop
Revised the Deployment.Status to accommodate the deployment state
conditions and driver state. Currently, Deployment has 3 conditions named
CertsVerified, CertsReady, and DriverDeployed. It also records the summary
of controller and node driver state, .i.e, no. of nodes the driver is
running.
In order to record real time status of the driver current had to rewrite
the current reconcile loop. The existing reconcile loop was keen on the
deployment CR changes and redeploy *only* the sub-objects that requires
to redeploy. Instead the new reconcile logic *refresh* all the objects
and CR status to keep the state consistent. The refresh chooses to
merge patching the objects to avoid all unnecessary updates.
There are two reconcile entry points:
- CR reconcile loop: refreshes all the sub-objects and CR status
- sub-object vent handler: redeploy only the deleted/changed resource
and updates CR status if required.
This also includes other code cleanups that come across.
FIXES: #611
Reason: 1 instance(s) of controller driver is running successfully
327
+
Status: Ready
328
+
Component: Node
329
+
Last Updated: 2020-10-08T07:45:11Z
330
+
Reason: All 3 node driver pod(s) running successfully
331
+
Status: Ready
332
+
Last Updated: 2020-10-07T07:32:21Z
333
+
Phase: Running
334
+
Reason: All driver components are deployed successfully
297
335
Events:
298
-
Type Reason Age From Message
299
-
---- ------ ---- ---- -------
300
-
Normal NewDeployment 34s pmem-csi-operator Processing new driver deployment
301
-
Normal Running 2s (x10 over 26s) pmem-csi-operator Driver deployment successful
302
-
336
+
Type Reason Age From Message
337
+
---- ------ ---- ---- -------
338
+
Normal NewDeployment 58s pmem-csi-operator Processing new driver deployment
339
+
Normal Running 39s pmem-csi-operator Driver deployment successful
303
340
304
341
$ kubectl get po
305
342
NAME READY STATUS RESTARTS AGE
@@ -1176,21 +1213,32 @@ active volumes.
1176
1213
1177
1214
#### DeploymentStatus
1178
1215
1179
-
A PMEM-CSI Deployment's `status` field is a `DeploymentStatus` object, which has
1180
-
a `phase` field. The phase of a Deployment is high-level summary of where the
1181
-
Deployment is in it's lifecycle.
1216
+
A PMEM-CSI Deployment's `status` field is a `DeploymentStatus` object, which
1217
+
carries the detailed state of the driver deployment. It comprises of deployment
1218
+
conditions, driver component status, and a `phase` field. The phase of a
1219
+
Deployment is a high-level summary of where the Deployment is in its lifecycle.
1182
1220
1183
1221
The possible `phase` values and their meaning are as below:
1184
1222
1185
1223
| Value | Meaning |
1186
1224
|---|---|
1187
1225
| empty string | A new deployment. |
1188
-
| Initializing | All the direct sub-resources of the `Deployment` are created, but some indirect ones (like pods controlled by a daemon set) may still be missing. |
1189
1226
| Running | The operator has determined that the driver is usable<sup>1</sup>. |
1190
-
| Failed | For some reason the state of the `Deployment` failed and cannot be progressed<sup>2</sup>. |
1227
+
| Failed | For some reason the state of the `Deployment` failed and cannot be progressed. |
1191
1228
1192
1229
<sup>1</sup> This check has not been implemented yet. Instead, the deployment goes straight to `Running` after creating sub-resources.
1193
-
<sup>2</sup> Failure reason is supposed to be carried by one of additional `DeploymentStatus` field, but not implemented yet.
1230
+
1231
+
#### Deployment Conditions
1232
+
1233
+
PMEM-CSI `DeploymentStatus` has an array of `conditions` through witch the
1234
+
PMEM-CSI Deployment has or has not passed. Below are the possible condition
1235
+
types and their meanings:
1236
+
1237
+
| Condition type | Meaning |
1238
+
|---|---|
1239
+
| CertsReady | Driver certificates/secrets are available. |
1240
+
| CertsVerified | Verified that the provided certificates are valid. |
1241
+
| DriverDeployed | All the componentes required for the PMEM-CSI deployment has been deployed. |
0 commit comments