Skip to content

Commit 285ccc5

Browse files
authored
Merge pull request #351 from werf/doc/document-how-to-add-special-resource-trackers
doc: document how to add special resource trackers
2 parents 327b5aa + 857ae46 commit 285ccc5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

pkg/tracker/generic/contrib_resource_status_rules.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
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+
15
rules:
6+
# Match the resource by its API group (without version)
27
- resourceGroup: "acid.zalan.do"
8+
# Match the resource by its kind (case insensitive)
39
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.
413
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.
517
humanJsonPath: "status.PostgresClusterStatus"
18+
# Fill out conditions as much as possible. Quality of tracking and error detection depends on
19+
# this.
620
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.
723
ready:
824
- "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.
928
progressing:
1029
- "Creating"
1130
- "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).
1235
failed:
1336
- "CreateFailed"
1437
- "UpdateFailed"

0 commit comments

Comments
 (0)