Chapter 96: Flux GitOps — Sources, Reconciliation and Safe Local Practice
96.8 Health checks and dependencies
Fictional teaching story. At a fictional Amravati lab, Kiran and Mia wait for a prerequisite before declaring the dependent exercise complete.
Why
Accepted configuration and a healthy running workload are different checkpoints.
What
Read readiness intent without inventing automatic application success.
How
A dependency orders reconciliation
A dependency is a prerequisite. dependsOn makes a Flux Kustomization wait for referenced Kustomizations to become Ready. A cycle means objects depend on each other so neither can proceed.
Immediate practice example
- Read the example from top to bottom. Do not send it to a real cluster.
spec:
dependsOn:
- name: classroom-config
- Read the expected result.
Illustrative output: not executed by Flux, kubectl, Helm or Kubernetes.
The dependent Kustomization waits for classroom-config to become Ready.
- Understand each line in plain English.
This partial spec names another Flux Kustomization, not any arbitrary ConfigMap. The list can express prerequisites. It does not automatically create the prerequisite or prove semantic compatibility. Avoid A-depends-on-B-and-B-depends-on-A cycles. A name match alone is not authorization.
Wait and explicit health checks are different settings
A health check observes whether applied resources reach the expected readiness. wait: true checks all reconciled resources; the fetched documentation says it ignores an explicit healthChecks list when enabled. A timeout bounds a reconciliation operation’s wait.
Immediate practice example
- Read the example from top to bottom. Do not send it to a real cluster.
spec:
wait: true
timeout: 1m
- Read the expected result.
Illustrative output: not executed by Flux, kubectl, Helm or Kubernetes.
Reconciliation waits for supported readiness checks within the configured operation timeout.
- Understand each line in plain English.
Both fields belong to the Flux Kustomization spec. wait asks for readiness checking, not a synthetic user transaction. timeout is not a universal application startup guarantee or service-level agreement. Choose either the appropriate explicit checks or the all-resource wait behaviour after reading installed-version documentation.
Ravindra Bagale's Tip
Ready is useful evidence, but it is not a complete business transaction test.
Ready हा उपयोगी पुरावा आहे; पूर्ण business transaction test नाही.
Ready उपयोगी evidence है; पूरा business transaction test नहीं.
Did you understand? Let us try it once more.