Skip to content

feat: 🎉 Add configurable CRD health checks#675

Open
titigmr wants to merge 1 commit into
InseeFrLab:mainfrom
titigmr:main
Open

feat: 🎉 Add configurable CRD health checks#675
titigmr wants to merge 1 commit into
InseeFrLab:mainfrom
titigmr:main

Conversation

@titigmr

@titigmr titigmr commented Jun 25, 2026

Copy link
Copy Markdown

Motivation

The health check logic in HelmReleaseHealthResolver work for a fixed set of resources: Deployment, StatefulSet, DaemonSet, and CNPG Cluster.

The CNPG case shows that supporting CRDs is needed but the current implementation requires a code change for each new CRD. Making the approach generic is more valuable than continuing to add hardcoded CRD cases.

What changed

In addition to the default behavior, HelmReleaseHealthResolver reads a list of CRD health check configurations from health.custom-crd.checks with two strategies:

  • FIELDS : reads two integer fields from status (e.g. instances / readyInstances). Used by CNPG.
  • CONDITION : checks status.conditions for a condition of the configured type with status: True (generally default behavior for CRD).

CNPG, previously hardcoded, is now declared as the default entry in application.properties. Existing behaviour is preserved without any configuration change.

Usage example - Crossplane OpenStack InstanceV2

health.custom-crd.checks[1].group=compute.crossplane.io
health.custom-crd.checks[1].version=v1alpha1
health.custom-crd.checks[1].plural=instancev2s
health.custom-crd.checks[1].kind=InstanceV2
health.custom-crd.checks[1].strategy=CONDITION
health.custom-crd.checks[1].condition-type=Ready

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant