Skip to content

🌱 Update test environment to Kubernetes 1.34 to match scaffolded projects#5157

Merged
k8s-ci-robot merged 3 commits intomasterfrom
copilot/fix-test-e2e-local-error
Oct 30, 2025
Merged

🌱 Update test environment to Kubernetes 1.34 to match scaffolded projects#5157
k8s-ci-robot merged 3 commits intomasterfrom
copilot/fix-test-e2e-local-error

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

make test-e2e-local fails with 404 when fetching kubebuilder-tools because the test environment was using a different Kubernetes version than the scaffolded projects.

Changes

  • Update KIND_K8S_VERSION from v1.33.0 to v1.34.0 in test/common.sh to match the k8s.io/api v0.34.1 used in scaffolded projects
  • Update setup-envtest from release-0.20 to release-0.22 to support Kubernetes 1.34

This ensures the e2e test environment uses the same Kubernetes version as the scaffolded projects (testdata/project-v4/go.mod), maintaining consistency across the codebase.

Version 1.34.0 is supported by controller-runtime release-0.22 and has available tooling in the setup-envtest GCS bucket.

Addresses #4082
Fixes #4515

Original prompt

This section details on the original issue you should resolve

<issue_title>make test-e2e-local fails</issue_title>
<issue_description>

Issue Description

When running make test-e2e-local, the script fails with a 404 Not Found error while attempting to fetch kubebuilder-tools-1.31.0-linux-amd64.tar.gz from Google Cloud Storage (GCS).

Image

</issue_description>

<agent_instructions># AGENTS.md

Kubebuilder

Project Overview

Kubebuilder is a framework and command-line interface (CLI) for building Kubernetes APIs using Custom Resource Definitions (CRDs).
It provides scaffolding and abstractions that accelerate the development of controllers, webhooks, and APIs written in Go.


Core Components

controller-runtime

  • Repository: kubernetes-sigs/controller-runtime
  • Purpose: Runtime building blocks for controllers.
  • Capabilities:
    • Define and manage controllers and reconcilers
    • Run managers coordinating multiple controllers
    • Register and handle webhooks
    • Expose metrics and health probes

controller-tools

  • Repository: kubernetes-sigs/controller-tools
  • Purpose: Code and manifest generation.
  • Capabilities:
    • Generate CRDs, RBAC, OpenAPI specs
    • Provide Make targets: make generate, make manifests, etc.

Extensibility and Integrations


Architecture

  • Design: Modular, plugin-based.
  • Core Plugins:
    • pkg/plugins/golang/v4 — scaffolds Go projects
    • pkg/plugins/common/kustomize/v2 — scaffolds the config/ dir using Kustomize
  • Additional Plugins:
    • pkg/plugins/helm/v2-alpha — Helm-based operators
    • pkg/plugins/deploy-image — container image support
    • pkg/plugins/autoupdate/v1-alpha — upgrade automation
    • Full list under docs/book/src/plugins/available

Repository Layout

Path Purpose
cmd/ CLI entry point
pkg/plugins/ Built-in plugins (Golang, Kustomize, Helm, etc.)
pkg/cli, pkg/machinery, pkg/model, pkg/internal Core framework used by plugins
hack/docs/ Doc build scripts (generate.sh)
docs/book/ User guide sources
testdata/ Canonical scaffolded sample projects
test/ Integration & E2E tests (e2e/, features.sh)
designs/ PEPs and design proposals
roadmap/ Release goals by year

Build & Test Commands

Build Kubebuilder

# Build local binary into ./bin/
make build

# Install into $GOBIN so `kubebuilder` is on PATH
make install

After modifying scaffolding or code generation, run:

make generate

Lint & Style Checks

# Validate and fix code style issues
make lint-fix

Testing Instructions

Pre-requisites

To run tests under test/ you need:

  • Go
  • Docker
  • kind (Kubernetes-in-Docker)
  • Kubebuilder binary built and installed locally

Cluster setup

# Install kubebuilder binary
make install

# Clean up any existing test cluster
kind delete cluster

# Create a new kind cluster
kind create cluster

Ensure kubectl config current-context points to kind-kind before running tests.

Running e2e tests

# Run all tests
go test ./test/... -v

The test suite includes both:

  • Unit tests — run locally without cluster dependencies.
  • **Integration / E...

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 30, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @Copilot. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

This fixes the 404 error when fetching kubebuilder-tools by using
Kubernetes 1.32.0 which is available in setup-envtest (release-0.20).
The previous version v1.33.0 was too new and the corresponding
kubebuilder-tools were not yet available.

Co-authored-by: camilamacedo86 <7708031+camilamacedo86@users.noreply.github.com>
test/common.sh Outdated
fi

export KIND_K8S_VERSION="${KIND_K8S_VERSION:-"v1.33.0"}"
export KIND_K8S_VERSION="${KIND_K8S_VERSION:-"v1.32.0"}"
Copy link
Member

Choose a reason for hiding this comment

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

it should use the same verison used by go mod scaffolded
1.34

Copy link
Member

Choose a reason for hiding this comment

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

@copilot see my comment

it should use the same verison used by go mod scaffolded
1.34.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use Kubernetes 1.34.0 to match the scaffolded go.mod (k8s.io/api v0.34.1). Also updated setup-envtest to release-0.22 to support k8s 1.34. Changes verified and working. Commit: 5d547cd

Copilot AI changed the title [WIP] Fix 404 error in make test-e2e-local script Fix test-e2e-local 404 error by downgrading to Kubernetes 1.32 Oct 30, 2025
Copilot AI requested a review from camilamacedo86 October 30, 2025 15:48
Updated KIND_K8S_VERSION from v1.32.0 to v1.34.0 and setup-envtest
from release-0.20 to release-0.22 to align with the k8s.io/api v0.34.1
version used in testdata/project-v4/go.mod.

This ensures the e2e tests use the same Kubernetes version as the
scaffolded projects, maintaining consistency across the codebase.

Co-authored-by: camilamacedo86 <7708031+camilamacedo86@users.noreply.github.com>
Copilot AI changed the title Fix test-e2e-local 404 error by downgrading to Kubernetes 1.32 Update test environment to Kubernetes 1.34 to match scaffolded projects Oct 30, 2025
@camilamacedo86 camilamacedo86 changed the title Update test environment to Kubernetes 1.34 to match scaffolded projects 🌱 Update test environment to Kubernetes 1.34 to match scaffolded projects Oct 30, 2025
@camilamacedo86
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 30, 2025
@camilamacedo86 camilamacedo86 marked this pull request as ready for review October 30, 2025 18:33
@k8s-ci-robot k8s-ci-robot removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 30, 2025
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great 👍

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, Copilot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2025
@camilamacedo86
Copy link
Member

/test pull-kubebuilder-e2e-k8s-1-33-0

@k8s-ci-robot k8s-ci-robot merged commit e9ee396 into master Oct 30, 2025
30 of 34 checks passed
@camilamacedo86 camilamacedo86 deleted the copilot/fix-test-e2e-local-error branch October 30, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make test-e2e-local fails

3 participants