Skip to content

Kstatus compatibility - #7648

Closed
fergian94 wants to merge 5 commits into
projectcontour:mainfrom
fergian94:kstatus
Closed

Kstatus compatibility#7648
fergian94 wants to merge 5 commits into
projectcontour:mainfrom
fergian94:kstatus

Conversation

@fergian94

Copy link
Copy Markdown

Problem

Since the introduction of kstatus in Helm 4, custom resources can now be monitored during install. For HTTPProxy and ExtensionService CRs, the Valid condition type is not recognized by kstatus logic,
which specifically looks for a Ready condition. This causes Helm to assume resources are immediately ready, defeating the purpose of --wait.

Solution

Mirror the Valid condition into an additional Ready condition, which kstatus recognizes. The Valid condition is preserved for backward compatibility and Contour's existing tooling, while the Ready
condition enables proper integration with Helm 4, Flux, Argo CD, and kubectl wait.

Cleanup

Removed the workaround for #7391 in hack/generate-crd-yaml.sh as it is no longer needed with k8s.io/api v0.35.4.

@fergian94
fergian94 requested a review from a team as a code owner July 29, 2026 15:04
@fergian94
fergian94 requested review from sunjayBhatia and tsaarni and removed request for a team July 29, 2026 15:04
@fergian94 fergian94 changed the title Kstatus Kstatus compatibility Jul 29, 2026
(helm 4, Flux, Argo CD, kubectl wait)

Signed-off-by: Giovanni Ferrara <giovanni.ferrara@ericsson.com>
Signed-off-by: Giovanni Ferrara <giovanni.ferrara@ericsson.com>
Signed-off-by: Giovanni Ferrara <giovanni.ferrara@ericsson.com>
Signed-off-by: Giovanni Ferrara <giovanni.ferrara@ericsson.com>
Signed-off-by: Giovanni Ferrara <giovanni.ferrara@ericsson.com>
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.31%. Comparing base (895e3a2) to head (0593def).
⚠️ Report is 44 commits behind head on main.

Files with missing lines Patch % Lines
internal/status/extensionstatus.go 0.00% 10 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7648      +/-   ##
==========================================
- Coverage   82.32%   82.31%   -0.02%     
==========================================
  Files         130      130              
  Lines       15624    15891     +267     
==========================================
+ Hits        12863    13081     +218     
- Misses       2478     2523      +45     
- Partials      283      287       +4     
Files with missing lines Coverage Δ
internal/status/proxystatus.go 84.90% <100.00%> (+2.68%) ⬆️
internal/status/extensionstatus.go 48.14% <0.00%> (-10.95%) ⬇️

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tsaarni

tsaarni commented Aug 10, 2026

Copy link
Copy Markdown
Member

Thank You @fergian94 for contributing!

I have now spent some time studying this topic, and as we discussed elsewhere, I can take over implementing it.

I propose using a different approach than currently suggested: instead of adding a Ready condition to mirror the Valid condition, we should add Stalled condition as recommended in the kstatus docs. This avoids having two redundant conditions for single success status and it can indicate failure using the abnormal-true pattern which clients can recognize immediately when it becomes true (failure becomes active), instead of timing out on a normal-true condition (no success within reasonable period of time).

We also need to implement .status.observedGeneration at the top level and add end-to-end tests using the actual kstatus library to ensure it works correctly.

This is being addressed in #7664, so I think we can close this PR.

@fergian94

fergian94 commented Aug 11, 2026 via email

Copy link
Copy Markdown
Author

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.

3 participants