|
| 1 | +# For many of the standard Kubernetes resources we have generic logic to detect their status. |
| 2 | +# But for some resources, especially Custom Resources, we need more specific logic to determine |
| 3 | +# their status. Custom rules to detect status of such resources are defined in this file. |
| 4 | + |
1 | 5 | rules: |
| 6 | + # Match the resource by its API group (without version) |
2 | 7 | - resourceGroup: "acid.zalan.do" |
| 8 | + # Match the resource by its kind (case insensitive) |
3 | 9 | resourceKind: "postgresql" |
| 10 | + # JSON Path to match the single field in the resource live manifest (get the manifest via |
| 11 | + # `kubectl get -o json`). This is the field that we will monitor to determine the resource |
| 12 | + # status. |
4 | 13 | jsonPath: "$.status.PostgresClusterStatus" |
| 14 | + # JSON Path in more human-readable form, used only in deploy logs to inform the user of the |
| 15 | + # field that we are monitoring. Anything can be here, it does not need to be a valid JSON |
| 16 | + # path, but it should be informative. |
5 | 17 | humanJsonPath: "status.PostgresClusterStatus" |
| 18 | + # Fill out conditions as much as possible. Quality of tracking and error detection depends on |
| 19 | + # this. |
6 | 20 | conditions: |
| 21 | + # If the field that we got via JSON Path has value "Running", then we consider the resource |
| 22 | + # to be ready. Status tracking for this resource stopped immediately. |
7 | 23 | ready: |
8 | 24 | - "Running" |
| 25 | + # If the field that we got via JSON Path has value "Creating" or "Updating", then we |
| 26 | + # consider the resource neither ready nor failed yet. Status tracking for this resource |
| 27 | + # will continue. |
9 | 28 | progressing: |
10 | 29 | - "Creating" |
11 | 30 | - "Updating" |
| 31 | + # If the field that we got via JSON Path has value "CreateFailed" or "UpdateFailed" or |
| 32 | + # "DeleteFailed", then we consider the resource to be failed. Status tracking for this |
| 33 | + # resource will stop if the error threshold (configurable by the user) is reached. The |
| 34 | + # deployment will fail (configurable by the user). |
12 | 35 | failed: |
13 | 36 | - "CreateFailed" |
14 | 37 | - "UpdateFailed" |
|
0 commit comments