Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document how to add special resource trackers #351

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pkg/tracker/generic/contrib_resource_status_rules.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# For many of the standard Kubernetes resources we have generic logic to detect their status.
# But for some resources, especially Custom Resources, we need more specific logic to determine
# their status. Custom rules to detect status of such resources are defined in this file.

rules:
# Match the resource by its API group (without version)
- resourceGroup: "acid.zalan.do"
# Match the resource by its kind (case insensitive)
resourceKind: "postgresql"
# JSON Path to match the single field in the resource live manifest (get the manifest via
# `kubectl get -o json`). This is the field that we will monitor to determine the resource
# status.
jsonPath: "$.status.PostgresClusterStatus"
# JSON Path in more human-readable form, used only in deploy logs to inform the user of the
# field that we are monitoring. Anything can be here, it does not need to be a valid JSON
# path, but it should be informative.
humanJsonPath: "status.PostgresClusterStatus"
# Fill out conditions as much as possible. Quality of tracking and error detection depends on
# this.
conditions:
# If the field that we got via JSON Path has value "Running", then we consider the resource
# to be ready. Status tracking for this resource stopped immediately.
ready:
- "Running"
# If the field that we got via JSON Path has value "Creating" or "Updating", then we
# consider the resource neither ready nor failed yet. Status tracking for this resource
# will continue.
progressing:
- "Creating"
- "Updating"
# If the field that we got via JSON Path has value "CreateFailed" or "UpdateFailed" or
# "DeleteFailed", then we consider the resource to be failed. Status tracking for this
# resource will stop if the error threshold (configurable by the user) is reached. The
# deployment will fail (configurable by the user).
failed:
- "CreateFailed"
- "UpdateFailed"
Expand Down
Loading