feat: add reusable create-cluster (Kind) composite action - #1072
feat: add reusable create-cluster (Kind) composite action#1072TrueFurina wants to merge 4 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| kubernetes-version: | ||
| description: Kubernetes version for the cluster. | ||
| required: false | ||
| default: v1.31.0 |
There was a problem hiding this comment.
1.36 please take a look at the workflow in the community distribution as reference
There was a problem hiding this comment.
Actually we will soon upgrade to 1.37 https://github.com/kubernetes-sigs/kind/releases/tag/v0.33.0
|
Hi @TrueFurina! Checking in to see if you are still working on the PR. There are some pending comments above that needed to be addressed. |
|
Thanks @juliusvonkohout — updated the composite action to Kubernetes 1.37 (kind v0.33.0):
Let me know if you'd prefer a different node-image pin or a multi-node config. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved findings affect workspace state, kubeconfig handling, Kubernetes-version behavior, and third-party action pinning.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a reusable composite action for creating a Kind Kubernetes cluster in CI.
Changes:
- Adds configurable Kubernetes version, node image, and cluster name inputs.
- Creates a single-control-plane Kind cluster.
- Exports
KUBECONFIGfor subsequent workflow steps. - Adds Kind cluster configuration.
File summaries
| File | Summary |
|---|---|
.github/actions/create-cluster/action.yml |
Defines the reusable cluster setup action. Review findings cover unintended checkout behavior, KUBECONFIG handling, Kubernetes version/image alignment, and pinning the third-party action. |
.github/actions/create-cluster/kind-config.yaml |
Provides the Kind control-plane configuration. |
Review details
Suppressed comments (1)
.github/actions/create-cluster/action.yml:10
kubernetes-versionis described as controlling both kubectl and the node image, but its only use iskubectl_versionat line 31. If a caller overrides this input without also overridingkind-node-image, the action still creates a v1.37.0 cluster, so the requested Kubernetes version is not what the tests run against. Either derive/validate a matching image or rename and document this input as the kubectl version.
kubernetes-version:
description: Kubernetes version (drives the kubectl version and the pinned node image below).
required: false
default: v1.37.0
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - name: Checkout repository | ||
| uses: actions/checkout@v4 |
| - name: Export KUBECONFIG | ||
| shell: bash | ||
| run: | | ||
| echo "KUBECONFIG=$HOME/.kube/config" >> "$GITHUB_ENV" |
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Create Kind cluster | ||
| uses: helm/kind-action@v1.15.0 |
…caller KUBECONFIG
|
Addressed all three points from the Copilot review, plus the version bump requested earlier.
Also carried over from @juliusvonkohout's earlier comments: Kubernetes 1.37 via kind v0.33.0, with Head is |
Summary
Adds a reusable composite action (
.github/actions/create-cluster) that spins up a local Kubernetes cluster (Kind) so CI jobs can run against a real cluster instead of each workflow re-implementing the setup inline. This mirrors the pattern already used bysdkandtrainere2e workflows.Requirements met
KUBECONFIG(via$GITHUB_ENV) so subsequent steps can talk to the cluster directlyChanges
.github/actions/create-cluster/action.ymlVerification
runs.using: composite)