Prepare for testing with spread#28
Merged
addyess merged 6 commits intoproject-bootstrapfrom Mar 3, 2026
Merged
Conversation
b6bfb1c to
c77778a
Compare
9ca1d08 to
c840636
Compare
4f4a76b to
9160e63
Compare
9160e63 to
e5a98d7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the manifest schema and component configuration to support spread-based component tests, and wires a new kube-galaxy test flow that orchestrates spread suites from a shared tests directory.
Changes:
- Replace
use-spreadwithtestand changerepofrom a string to a structuredRepoInfoobject in manifests/models/loader. - Add spread test orchestration (template + generator + runner) including kubeconfig sharing and per-component namespace lifecycle.
- Update CLI/workflow/tests to the new schema and to pass
arch_infointo component instances.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_validator.py | Updates spread component discovery test to use temp tests_root and test flag. |
| tests/unit/test_models.py | Updates model unit test from use_spread to test. |
| tests/unit/test_loader.py | Updates loader unit test expectations to test flag. |
| tests/unit/conftest.py | Updates sample manifest YAML to new repo.base-url shape; adds arch_info fixture. |
| tests/unit/components/test_kubelet.py | Updates component config construction to use RepoInfo and inject arch_info. |
| tests/unit/components/test_kubeadm.py | Updates component config construction to use RepoInfo and inject arch_info. |
| tests/unit/components/test_container_manifest.py | Updates tests for new RepoInfo and arch_info plumbing. |
| tests/unit/components/test_base_utils.py | Updates base utils tests for RepoInfo and new download_filename_from_config() signature. |
| tests/spread.yaml | Removes the repository-level spread config in favor of generated orchestration config. |
| src/kube_galaxy/pkg/utils/components.py | Introduces format_component_pattern() and removes GitHub-specific URL builder. |
| src/kube_galaxy/pkg/testing/templates/spread.yaml.tmpl | Adds a spread.yaml template for orchestration. |
| src/kube_galaxy/pkg/testing/spread.py | Implements spread orchestration, kubeconfig sharing, namespace lifecycle, and execution. |
| src/kube_galaxy/pkg/manifest/validator.py | Adds test task path helper and basic validation for component test structure. |
| src/kube_galaxy/pkg/manifest/models.py | Adds RepoInfo, replaces use_spread with test, adds InstallMethod.NONE. |
| src/kube_galaxy/pkg/manifest/loader.py | Parses new repo object, defaults install method to none, reads test flag. |
| src/kube_galaxy/pkg/literals.py | Adds tests paths and timeouts; replaces manifest field constant with TEST. |
| src/kube_galaxy/pkg/components/sonobuoy.py | Adds a test-only Sonobuoy component that writes a spread task. |
| src/kube_galaxy/pkg/components/kubeadm.py | Adjusts kubeadm init config to clear node taints. |
| src/kube_galaxy/pkg/components/containerd.py | Updates pause image resolution and uses shared pattern formatter. |
| src/kube_galaxy/pkg/components/_base.py | Makes arch_info required, centralizes pattern formatting, adds InstallMethod.NONE handling. |
| src/kube_galaxy/pkg/cluster.py | Ensures arch_info is passed when instantiating components; tweaks stage numbering. |
| src/kube_galaxy/cmd/validate.py | Removes the old validate command handler module. |
| src/kube_galaxy/cmd/test.py | Reworks test command to spread(manifest_path) and moves validate logic here. |
| src/kube_galaxy/cli.py | Simplifies CLI commands; changes test and validate wiring and signatures. |
| manifests/smoktest.yaml | Migrates to repo.base-url; adds sonobuoy as a test-only component. |
| manifests/baseline-k8s-1.36.yaml | Migrates to repo.base-url schema. |
| manifests/baseline-k8s-1.35.yaml | Migrates to repo.base-url schema. |
| manifests/baseline-k8s-1.34.yaml | Migrates to repo.base-url schema. |
| manifests/baseline-k8s-1.33.yaml | Migrates to repo.base-url schema. |
| docs/spread-based-component-tests-prompt.md | Adds a design/plan document for spread-based component tests. |
| docs/component-lifecycle-hooks.md | Removes references to now-removed hook config accessors. |
| docs/class-based-components.md | Removes hook-config section/docs that no longer match models. |
| README.md | Updates examples/docs for repo object and test flag. |
| .github/workflows/test-baseline-clusters.yml | Installs spread + LXD and runs kube-galaxy test <manifest>; uploads logs/. |
| .github/copilot-instructions.md | Updates schema references but still contains outdated CLI examples. |
| .github/ARCHITECTURE.md | Updates narrative references from use-spread to test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
addyess
added a commit
that referenced
this pull request
Mar 5, 2026
* Bootstrap project * Test `single-node-no-cni` manifest in PR (#1) Scaffold out the project to create kubeadm clusters on PRs and verify their installation. * Missing custom installation of kubernetes container services * Missing implementation of spread tests * Reduce sudo usage and exec calls (#20) * Install cni-plugins before kubelet starts (#21) * Understand why gh runners don't need cni-plugins * Create component for cni-plugins * Remove early debug * handle all installation methods * Address review comments * Import images via pull or import (#22) * Begin to implement image pull * Adjust hooks to not need arch passed * Bind kubeadm bootstrap to pre-pulled images defined by the manifest * Address review comments * Dynamic hook execution * Update src/kube_galaxy/pkg/components/kubeadm.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address review comments * Golf --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove unused fields from manifest and components (#23) * Tidy up more of the components (#24) * Tidy up more of the components * Review comment * Parallelize image pulls and install (#25) * First shot deploying with a calico CNI (#26) * First shots deploying with a calico CNI * Validate manifest applications * Validate kube-system is deployed * Update tests/unit/components/test_container_manifest.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply review comments --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Prepare for testing with spread (#28) * Prepare for testing with spread * Ready CNCF validation * Prepared a Sonobouy component * Kubeadm bootstraps with no node taints * Review comments * Single out the kube-galaxy tasks from each component's spread suite. * Update implementation to match documentation (#30) * Rollup kubectl commands to a common library (#31) * Rollup kubectl commands to a common library * Apply review comments * Additional unit tests * Apply review comments --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates documentation and workflow files to standardize the terminology and configuration for component-driven tests in the Kubernetes testing infrastructure. The main change is replacing the
use-spreadflag with a more generaltestflag, and expanding therepofield to support more flexible repository configurations. These updates improve clarity and flexibility for component test definitions and workflow execution.Manifest and Component Configuration Changes:
use-spreadflag with thetestflag in documentation, YAML examples, and workflow instructions, clarifying that components providing tests should usetest: true. [1] [2] [3] [4] [5] [6] [7]repofield in component manifests from a simple string to an object supportingbase-url,subdir, andref, enabling monorepo support and flexible branch/tag selection. [1] [2] [3]Workflow and CLI Usage Updates:
testflag, including changes to test execution commands and artifact paths. [1] [2]Tooling and Environment Setup:
Documentation Cleanup:
hook_configproperty in component class documentation, simplifying configuration property access. [1] [2] [3]