Skip to content

Commit 9c306c7

Browse files
Merge pull request #105 from tirthct/hyperfleet-857
HYPERFLEET-857 - refactor: update Sentinel config from Ready to Reconciled
2 parents c5265fc + 7e11955 commit 9c306c7

18 files changed

Lines changed: 191 additions & 191 deletions

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ message_data:
9393
9494
CEL context includes:
9595
- `resource` — the cluster/nodepool object from API
96-
- `reason` — decision string ("not_ready", "ready_stale", "ready_fresh")
96+
- `reason` — decision string ("not_reconciled", "reconciled_stale", "reconciled_fresh")
9797

9898
## Project Boundaries
9999

@@ -122,8 +122,8 @@ Sentinel is one component in the HyperFleet control plane:
122122
- **Broker** (RabbitMQ or Pub/Sub) decouples Sentinel from adapters
123123

124124
Sentinel's job: **decide when**, not **execute how**. Max age intervals define "when":
125-
- `max_age_not_ready`: poll frequently for unstable resources
126-
- `max_age_ready`: poll infrequently for stable resources
125+
- `max_age_not_reconciled`: poll frequently for unstable resources
126+
- `max_age_reconciled`: poll infrequently for stable resources
127127

128128
## Local Development
129129

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ poll_interval: 5s
240240
241241
message_decision:
242242
params:
243-
ref_time: 'condition("Ready").last_updated_time'
244-
is_ready: 'condition("Ready").status == "True"'
243+
ref_time: 'condition("Reconciled").last_updated_time'
244+
is_reconciled: 'condition("Reconciled").status == "True"'
245245
has_ref_time: 'ref_time != ""'
246-
is_new_resource: '!is_ready && resource.generation == 1'
247-
generation_mismatch: 'resource.generation > condition("Ready").observed_generation'
248-
ready_and_stale: 'is_ready && has_ref_time && now - timestamp(ref_time) > duration("30m")'
249-
not_ready_and_debounced: '!is_ready && has_ref_time && now - timestamp(ref_time) > duration("10s")'
250-
result: "is_new_resource || generation_mismatch || ready_and_stale || not_ready_and_debounced"
246+
is_new_resource: '!is_reconciled && resource.generation == 1'
247+
generation_mismatch: 'resource.generation > condition("Reconciled").observed_generation'
248+
reconciled_and_stale: 'is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("30m")'
249+
not_reconciled_and_debounced: '!is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("10s")'
250+
result: "is_new_resource || generation_mismatch || reconciled_and_stale || not_reconciled_and_debounced"
251251
252252
resource_selector:
253253
- label: shard

charts/values.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ config:
113113
# Result is a CEL boolean expression that determines whether to publish an event.
114114
messageDecision:
115115
params:
116-
ref_time: 'condition("Ready").last_updated_time'
117-
is_ready: 'condition("Ready").status == "True"'
116+
ref_time: 'condition("Reconciled").last_updated_time'
117+
is_reconciled: 'condition("Reconciled").status == "True"'
118118
has_ref_time: 'ref_time != ""'
119-
is_new_resource: '!is_ready && resource.generation == 1'
120-
generation_mismatch: 'resource.generation > condition("Ready").observed_generation'
121-
ready_and_stale: 'is_ready && has_ref_time && now - timestamp(ref_time) > duration("30m")'
122-
not_ready_and_debounced: '!is_ready && has_ref_time && now - timestamp(ref_time) > duration("10s")'
123-
result: 'is_new_resource || generation_mismatch || ready_and_stale || not_ready_and_debounced'
119+
is_new_resource: '!is_reconciled && resource.generation == 1'
120+
generation_mismatch: 'resource.generation > condition("Reconciled").observed_generation'
121+
reconciled_and_stale: 'is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("30m")'
122+
not_reconciled_and_debounced: '!is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("10s")'
123+
result: 'is_new_resource || generation_mismatch || reconciled_and_stale || not_reconciled_and_debounced'
124124

125125
# Resource selector for horizontal sharding
126126
# Deploy multiple Sentinel instances with different shard values

configs/dev-example.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ poll_interval: 2s
5353
# Shorter debounce intervals for development.
5454
message_decision:
5555
params:
56-
ref_time: 'condition("Ready").last_updated_time'
57-
is_ready: 'condition("Ready").status == "True"'
56+
ref_time: 'condition("Reconciled").last_updated_time'
57+
is_reconciled: 'condition("Reconciled").status == "True"'
5858
has_ref_time: 'ref_time != ""'
59-
is_new_resource: '!is_ready && resource.generation == 1'
60-
generation_mismatch: 'resource.generation > condition("Ready").observed_generation'
61-
ready_and_stale: 'is_ready && has_ref_time && now - timestamp(ref_time) > duration("2m")'
62-
not_ready_and_debounced: '!is_ready && has_ref_time && now - timestamp(ref_time) > duration("5s")'
63-
result: "is_new_resource || generation_mismatch || ready_and_stale || not_ready_and_debounced"
59+
is_new_resource: '!is_reconciled && resource.generation == 1'
60+
generation_mismatch: 'resource.generation > condition("Reconciled").observed_generation'
61+
reconciled_and_stale: 'is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("2m")'
62+
not_reconciled_and_debounced: '!is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("5s")'
63+
result: 'is_new_resource || generation_mismatch || reconciled_and_stale || not_reconciled_and_debounced'
6464

6565
# Messaging system type for OpenTelemetry tracing attributes.
6666
# Should match the actual message broker being used for accurate observability.
@@ -82,7 +82,7 @@ messaging_system: "rabbitmq"
8282
#
8383
# Examples:
8484
# field: "resource.id" — field access
85-
# field: 'condition("Ready").status == "True" ? "Ready" : "NotReady"' — conditional
85+
# field: 'condition("Reconciled").status == "True" ? "Reconciled" : "NotReconciled"' — conditional
8686
# field: '"constant"' — CEL string literal
8787
# field: "reason" — decision reason
8888
#
@@ -102,7 +102,7 @@ message_data:
102102
# kind: "resource.owner_references.kind"
103103

104104
# examples of other possible fields
105-
#ready_status: 'resource.status.conditions.filter(c, c.type=="Ready")[0].value == "True" ? "Ready" : "NotReady"'
105+
#reconciled_status: 'resource.status.conditions.filter(c, c.type=="Reconciled")[0].status == "True" ? "Reconciled" : "NotReconciled"'
106106
#origin: "hyperfleet-sentinel"
107107

108108
# For local development, use environment variable:

configs/gcp-pubsub-example.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ poll_interval: 5s
5252
# Uses condition-based checks with configurable thresholds.
5353
message_decision:
5454
params:
55-
ref_time: 'condition("Ready").last_updated_time'
56-
is_ready: 'condition("Ready").status == "True"'
55+
ref_time: 'condition("Reconciled").last_updated_time'
56+
is_reconciled: 'condition("Reconciled").status == "True"'
5757
has_ref_time: 'ref_time != ""'
58-
is_new_resource: '!is_ready && resource.generation == 1'
59-
generation_mismatch: 'resource.generation > condition("Ready").observed_generation'
60-
ready_and_stale: 'is_ready && has_ref_time && now - timestamp(ref_time) > duration("30m")'
61-
not_ready_and_debounced: '!is_ready && has_ref_time && now - timestamp(ref_time) > duration("10s")'
62-
result: "is_new_resource || generation_mismatch || ready_and_stale || not_ready_and_debounced"
58+
is_new_resource: '!is_reconciled && resource.generation == 1'
59+
generation_mismatch: 'resource.generation > condition("Reconciled").observed_generation'
60+
reconciled_and_stale: 'is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("30m")'
61+
not_reconciled_and_debounced: '!is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("10s")'
62+
result: "is_new_resource || generation_mismatch || reconciled_and_stale || not_reconciled_and_debounced"
6363

6464
# Messaging system type for OpenTelemetry tracing attributes.
6565
# Should match the actual message broker being used for accurate observability.
@@ -88,7 +88,7 @@ resource_selector:
8888
#
8989
# Examples:
9090
# field: "resource.id" — field access
91-
# field: 'condition("Ready").status == "True" ? "Ready" : "NotReady"' — conditional
91+
# field: 'condition("Reconciled").status == "True" ? "Reconciled" : "NotReconciled"' — conditional
9292
# field: '"constant"' — CEL string literal
9393
# field: "reason" — decision reason
9494
#

configs/rabbitmq-example.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ poll_interval: 5s
5252
# Uses condition-based checks with configurable thresholds.
5353
message_decision:
5454
params:
55-
ref_time: 'condition("Ready").last_updated_time'
56-
is_ready: 'condition("Ready").status == "True"'
55+
ref_time: 'condition("Reconciled").last_updated_time'
56+
is_reconciled: 'condition("Reconciled").status == "True"'
5757
has_ref_time: 'ref_time != ""'
58-
is_new_resource: '!is_ready && resource.generation == 1'
59-
generation_mismatch: 'resource.generation > condition("Ready").observed_generation'
60-
ready_and_stale: 'is_ready && has_ref_time && now - timestamp(ref_time) > duration("30m")'
61-
not_ready_and_debounced: '!is_ready && has_ref_time && now - timestamp(ref_time) > duration("10s")'
62-
result: "is_new_resource || generation_mismatch || ready_and_stale || not_ready_and_debounced"
58+
is_new_resource: '!is_reconciled && resource.generation == 1'
59+
generation_mismatch: 'resource.generation > condition("Reconciled").observed_generation'
60+
reconciled_and_stale: 'is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("30m")'
61+
not_reconciled_and_debounced: '!is_reconciled && has_ref_time && now - timestamp(ref_time) > duration("10s")'
62+
result: "is_new_resource || generation_mismatch || reconciled_and_stale || not_reconciled_and_debounced"
6363

6464
# Messaging system type for OpenTelemetry tracing attributes.
6565
# Should match the actual message broker being used for accurate observability.
@@ -88,7 +88,7 @@ resource_selector:
8888
#
8989
# Examples:
9090
# field: "resource.id" — field access
91-
# field: 'condition("Ready").status == "True" ? "Ready" : "NotReady"' — conditional
91+
# field: 'condition("Reconciled").status == "True" ? "Reconciled" : "NotReconciled"' — conditional
9292
# field: '"constant"' — CEL string literal
9393
# field: "reason" — decision reason
9494
#

0 commit comments

Comments
 (0)