From 6f6d3fb26929c73ae3879fbe5157d26e1cd69d81 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 17 Jan 2025 12:23:41 +0200 Subject: [PATCH] Add ClusterAPI example to RFC Signed-off-by: Stefan Prodan --- rfcs/0000-custom-health-checks/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rfcs/0000-custom-health-checks/README.md b/rfcs/0000-custom-health-checks/README.md index 33a9f832..911a20c7 100644 --- a/rfcs/0000-custom-health-checks/README.md +++ b/rfcs/0000-custom-health-checks/README.md @@ -161,6 +161,16 @@ Using `.spec.healthCheckExprs`, Flux users can specify that the `Cluster` kind is expected to have a `Ready` condition which will force Flux into waiting for the ClusterAPI resources status to be populated. +Example for `Cluster`: + +```yaml + - apiVersion: cluster.x-k8s.io/v1beta1 + kind: Cluster + inProgress: "metadata.generation != status.observedGeneration" + failed: "status.conditions.filter(e, e.type == 'Ready').all(e, e.status == 'False')" + current: "status.conditions.filter(e, e.type == 'Ready').all(e, e.status == 'True')" +``` + ### Alternatives We need an expression language that is flexible enough to cover all possible use