Skip to content

ci: run CRD admission tests on a KinD cluster - #7

Merged
colinjlacy merged 1 commit into
runtimeconditions:mainfrom
antdelojpe:ci/e2e-crd-admission
Dec 1, 2026
Merged

colinjlacy merged 1 commit into
runtimeconditions:mainfrom
antdelojpe:ci/e2e-crd-admission

Conversation

@antdelojpe

@antdelojpe antdelojpe commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2

Summary

Adds an E2E GitHub Actions workflow that runs the existing tests/test_crd_admission.py against a live apiserver on every push and pull request.

The test already exercises the CRD's OpenAPI/CEL validation (required fields, extension URI rules and uniqueness, condition-name uniqueness, size limits), but no CI job ran it. test.yml only runs make test.

Changes

  • New .github/workflows/e2e.yml:
    • creates a KinD cluster with helm/kind-action (v1.15.2, pinned by SHA)
    • runs python3 tests/test_crd_admission.py
  • Follows the existing workflow conventions: pinned action SHAs, permissions: {} at the top level and contents: read on the job, persist-credentials: false.
  • The test itself is unchanged.

Verification

  • Ran tests/test_crd_admission.py locally on a KinD cluster: all 16 cases pass.
  • Ran the E2E, Lint and Tests workflows on my fork: all three succeeded.

Add an E2E workflow that creates a KinD cluster and runs
tests/test_crd_admission.py on push and pull requests.
@antdelojpe
antdelojpe force-pushed the ci/e2e-crd-admission branch from 3162ba1 to 4f91ec8 Compare December 1, 2026 03:18
@antdelojpe

Copy link
Copy Markdown
Contributor Author

Test evidence

tests/test_crd_admission.py passes on a KinD cluster in CI (run on my fork, same commit as this PR):
https://github.com/antdelojpe/runtime-conditions-crd/actions/runs/46567501900

Output (16 cases)
PASS CRD admission and estimated validation cost
PASS empty lists
PASS distinct names and extension URIs
PASS unnamed conditions
PASS duplicate condition names
PASS empty condition name
PASS duplicate extensions
PASS missing extension scheme
PASS extension size limits
PASS condition size limits
PASS all approved size limits
PASS extension count above 64
PASS extension URI above 2048 characters
PASS condition count above 256
PASS condition name above 128 characters
PASS extension-defined fields
Deleted temporary validation CRD

Notably, this verifies against a live apiserver that duplicate condition names are rejected, which #2 said had not been checked yet.

@colinjlacy colinjlacy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICELY DONE! Much needed, and I'm sure we'll reuse this approach for future builds as we add more CRDs. Muito obrigado!

@colinjlacy
colinjlacy merged commit b0c34ff into runtimeconditions:main Dec 1, 2026
3 checks passed
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.

Add e2e tests for the CRD

2 participants