Skip to content

Fix:[1852] Add TestK8APIEndpoints and run it across k8s v1.33-v1.37 in CI - #1851

Merged
sameerforge merged 1 commit into
carvel-dev:developfrom
sameerforge:topic/sameerkh/k8s-api-endpoints-test
Sep 9, 2026
Merged

sameerforge merged 1 commit into
carvel-dev:developfrom
sameerforge:topic/sameerkh/k8s-api-endpoints-test

Conversation

@sameerforge

@sameerforge sameerforge commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds TestK8APIEndpoints, an e2e test verifying that after deploying kapp-controller:

  • the aggregated APIService v1alpha1.data.packaging.carvel.dev becomes Available
  • data.packaging.carvel.dev/v1alpha1 discovery exposes packages and packagemetadatas
  • packaging.carvel.dev discovery exposes packageinstalls and packagerepositories
  • kappctrl.k14s.io discovery exposes apps

This closes a gap where kapp-controller's CRD/aggregated-API registration had no dedicated test coverage, so a regression here (e.g. the aggregated APIService failing to become Available on a given apiserver version) could only be caught indirectly, if at all. This test runs on every PR via the existing "Kind Cluster E2E tests" run-tests job, alongside the rest of the e2e suite, against the default kind node image.

Adds a new k8s-api-endpoints.yml workflow, on a daily schedule plus workflow_dispatch, that runs TestK8APIEndpoints across the range of k8s minor versions kapp-controller supports. Compatibility drift from new k8s releases isn't a per-diff regression concern, so this runs separately from PRs rather than adding checks to every one, following the same schedule + workflow_dispatch idiom as trivy-scan.yml/dependency-updater.yml. The minors tested are derived from the k8s.io/client-go version pinned in go.mod (the last 4 released minors plus the next one), so the range shifts automatically as dependency-updater.yml bumps go.mod instead of being hand-maintained. The latest patch for each minor is resolved at run time from kubernetes/kubernetes's tags (via git ls-remote, avoiding GitHub REST API rate limits). The job then loops over the resolved versions sequentially in a single job, creating and tearing down one kind cluster per version. A failure on one version doesn't stop the others: the loop runs through every version regardless, reports each failing k8s version via ::error:: annotations, and only fails the job once all versions have been attempted.

Sample CI run for this workflow :
https://github.com/sameerforge/kapp-controller/actions/runs/34329006415/job/102392900710

Which issue(s) this PR fixes:

Fixes #1852

Does this PR introduce a user-facing change?

NONE

Additional Notes for your reviewer:

  • The k8s-api-endpoints job installs kind/kubectl once via helm/kind-action@v1 (install_only: true, pinned to v0.33.0 because the action's current default, v0.31.0, can't parse the containerd config v4 format that newer kindest/node images ship — this was breaking kind load docker-image for k8s v1.34+), builds the kapp-controller image once, then loops: kind create clusterkind load docker-imagekapp deploy → run TestK8APIEndpointskind delete cluster, per resolved version.
  • run-tests (full e2e suite) is untouched and keeps testing against the default/latest kind node image.
Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


@carvel-bot carvel-bot added this to Carvel Sep 3, 2026
@sameerforge
sameerforge force-pushed the topic/sameerkh/k8s-api-endpoints-test branch 4 times, most recently from 79da279 to dff625b Compare September 4, 2026 07:06
@sameerforge
sameerforge requested a review from himsngh September 4, 2026 08:25
@sameerforge sameerforge changed the title Add TestK8APIEndpoints and run it across k8s v1.32-v1.36 in CI Add TestK8APIEndpoints and run it across k8s v1.33-v1.37 in CI Sep 7, 2026
@himsngh
himsngh requested a review from carvel-bot September 7, 2026 11:06
@himsngh himsngh moved this to Needs Review in Carvel Sep 7, 2026
@himsngh
himsngh requested review from praveenrewar and removed request for carvel-bot September 7, 2026 11:22
Comment thread .github/workflows/kind-action.yml Outdated
Comment thread .github/workflows/kind-action.yml Outdated
Comment thread .github/workflows/kind-action.yml Outdated
@sameerforge
sameerforge force-pushed the topic/sameerkh/k8s-api-endpoints-test branch 3 times, most recently from 68e5eb4 to 7851822 Compare September 8, 2026 08:48
@sameerforge

sameerforge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@sameerforge
sameerforge force-pushed the topic/sameerkh/k8s-api-endpoints-test branch 3 times, most recently from 59ef6e4 to 78d2430 Compare September 9, 2026 08:34
@sameerforge sameerforge changed the title Add TestK8APIEndpoints and run it across k8s v1.33-v1.37 in CI Fix:[1852] Add TestK8APIEndpoints and run it across k8s v1.33-v1.37 in CI Sep 9, 2026
Adds an e2e test that verifies kapp-controller's CRD-based API groups
(kappctrl.k14s.io/v1alpha1, packaging.carvel.dev/v1alpha1) and its
aggregated APIService (data.packaging.carvel.dev/v1alpha1) are
registered and discoverable after deploy. This runs on every PR via
the existing "Kind Cluster E2E tests" run-tests job, alongside the
rest of the e2e suite, against the default kind node image.

Adds a new k8s-api-endpoints.yml workflow, on a daily schedule plus
workflow_dispatch, that runs TestK8APIEndpoints across the range of
k8s minor versions kapp-controller supports. The minors tested are the
last 4 released ones plus the next, derived from the k8s.io/client-go
version pinned in go.mod so the range shifts automatically as
dependency-updater.yml bumps go.mod. The latest patch for each minor
is resolved at run time from the kindest/node Docker Hub tags API,
since kindest/node images are cut by the kind maintainers on their own
cadence and don't map one-for-one to kubernetes/kubernetes release
tags - the registry itself is the only accurate source for which node
images actually exist. The job loops over the resolved versions
sequentially, creating and tearing down one kind cluster per version;
a failure on one version doesn't stop the others - the loop runs
through every version regardless, reports each failing k8s version
via ::error:: annotations, and only fails the job once all versions
have been attempted. The kind CLI is pinned to v0.33.0 because the
action's default (v0.31.0) can't parse the containerd config v4
format that newer kindest/node images ship, which was breaking `kind
load docker-image` for k8s v1.34+.

Signed-off-by: Sameer <sameer.khan@broadcom.com>
@sameerforge
sameerforge force-pushed the topic/sameerkh/k8s-api-endpoints-test branch from 78d2430 to 6b5d772 Compare September 9, 2026 11:05
@sameerforge
sameerforge merged commit d7a354f into carvel-dev:develop Sep 9, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Closed in Carvel Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Add CI coverage verifying kapp-controller's API endpoints across k8s v1.33–v1.37

3 participants