Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
244177b
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 16, 2025
08e8e22
Bump actions/download-artifact from 6 to 7 (#13346)
dependabot[bot] Dec 22, 2025
d06d88f
Bump actions/cache from 4 to 5 (#13347)
dependabot[bot] Jan 5, 2026
4c51bee
Bump golangci-lint for go1.25
brandond Dec 12, 2025
b588793
Add lint/validate job
brandond Dec 12, 2025
d8023c8
lint: file is not properly formatted
brandond Dec 15, 2025
7cccc4a
lint: redundant-build-tag
brandond Dec 15, 2025
ea254f6
lint: use-any
brandond Dec 15, 2025
1dd4fe8
lint: dot-imports
brandond Dec 15, 2025
f05e58a
lint: comment-spacings
brandond Dec 15, 2025
4f70410
lint: deep-exit
brandond Dec 15, 2025
aba62a6
lint: bare-return
brandond Dec 15, 2025
e44f6d8
lint: bool-literal-in-expr
brandond Dec 15, 2025
b436189
lint: defer,get-return
brandond Dec 15, 2025
cd38754
lint: duplicated-imports
brandond Dec 15, 2025
0b81e2f
lint: empty-lines
brandond Dec 15, 2025
e492fda
lint: exported
brandond Dec 15, 2025
489e0a4
lint: if-return
brandond Dec 15, 2025
86b01ed
lint: import-alias-naming
brandond Dec 15, 2025
2bd54de
lint: indent-error-flow
brandond Dec 15, 2025
8602bcb
lint: redefines-builtin-id
brandond Dec 15, 2025
ad85246
lint: struct-tag
brandond Dec 15, 2025
b1e4527
lint: superfluous-else
brandond Dec 15, 2025
1b25fa9
lint: unchecked-type-assertion
brandond Dec 16, 2025
d9b1bb7
lint: unexported-naming
brandond Dec 16, 2025
4f65b9f
lint: unexported-return
brandond Dec 16, 2025
0a56a32
lint: unnecessary-stmt
brandond Dec 16, 2025
7456bab
lint: useless-break
brandond Dec 16, 2025
b770a88
lint: identical-switch-branches
brandond Dec 16, 2025
e5b6546
lint: unhandled-error
brandond Dec 16, 2025
f3849fd
lint: unnecessary-format,use-errors-new
brandond Dec 16, 2025
d5c5f2d
lint: nested-structs
brandond Dec 16, 2025
8edce2d
Fix PR lint checkout depth
brandond Dec 18, 2025
efa6a5b
Don't enforce use of wg.Go instead of Add/Done
brandond Dec 18, 2025
4ff949b
Replace temporary etcd server with raw mvcc store access
brandond Dec 18, 2025
0b50f53
Fix etcd reconcile with empty TLS dirs
brandond Dec 19, 2025
56ec4d9
Add tests for etcd local reconcile
brandond Dec 19, 2025
efec354
Remove flannel external-ip annotations when disabled
brandond Jan 6, 2026
7351ae6
Bump CNI plugins
brandond Jan 7, 2026
fe9609d
Drop use of deprecated docker reexec package
brandond Jan 7, 2026
3c7d04f
Fix atomic write in WriteSubnetFile
luojiyin1987 Dec 26, 2025
ce7c4b9
Bump expr-lang/expr
brandond Jan 7, 2026
1a850a8
Bump spegel to v0.6.0
brandond Nov 12, 2025
0d753c2
Add deferred store implimentation
brandond Nov 12, 2025
3c3c334
Update longhorn version in integration test from v1.4.0 to v1.10.1
brandond Jan 8, 2026
97d81bf
Bump kine for NATS conformance fixes
brandond Jan 7, 2026
1af25bb
Fix setup-go cache issues
brandond Jan 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
name: 'Setup golang with main only caching'
name: 'Setup Go with Limited Cache'
description: 'A composite action that installs golang, but with a caching strategy that only updates the cache on main branch.'
inputs:
go-version:
description: 'The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.'
default: ''

runs:
using: 'composite'
steps:
- uses: actions/setup-go@v5
- name: Find Latest Release Branch
shell: bash
run: |
LATEST_RELEASE_BRANCH=$(gh api repos/k3s-io/k3s/branches?per_page=100 --jq '[.[].name | select(startswith("release-"))] | sort_by(ltrimstr("release-") | tonumber) | last')
echo "LATEST_RELEASE_REF=refs/heads/$LATEST_RELEASE_BRANCH" | tee -a "$GITHUB_ENV"
env:
GH_TOKEN: ${{ github.token }}

- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod' # Just use whatever version is in the go.mod file
cache: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-1.32' }}
go-version: ${{ env.INPUT_GO_VERSION }}
go-version-file: 'go.mod' # if go-version is not set, just use whatever version is in the go.mod file
cache: ${{ github.ref == 'refs/heads/main' || github.ref == env.LATEST_RELEASE_REF }} # use default cache for main and most recent minor

- name: Prepare for go cache
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/release-1.32'
if: github.ref != 'refs/heads/main' && github.ref != env.LATEST_RELEASE_REF # use custom cache for older minors
shell: bash
run: |
echo "GO_CACHE=$(go env GOCACHE)" | tee -a "$GITHUB_ENV"
echo "GO_MODCACHE=$(go env GOMODCACHE)" | tee -a "$GITHUB_ENV"
echo "GO_VERSION=$(go env GOVERSION | tr -d 'go')" | tee -a "$GITHUB_ENV"

- name: Setup read-only cache
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/release-1.32'
uses: actions/cache/restore@v4
if: github.ref != 'refs/heads/main' && github.ref != env.LATEST_RELEASE_REF # use custom cache for older minors
uses: actions/cache/restore@v5
with:
path: |
${{ env.GO_MODCACHE }}
${{ env.GO_CACHE }}
# Match the cache key to the setup-go action https://github.com/actions/setup-go/blob/main/src/cache-restore.ts#L34
key: setup-go-${{ runner.os }}-${{ env.ImageOS }}-go-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
restore-keys: |
setup-go-${{ runner.os }}-
setup-go-${{ runner.os }}-
2 changes: 1 addition & 1 deletion .github/workflows/airgap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
./scripts/package-airgap ${{ matrix.arch }}

- name: Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: images-${{ matrix.arch }}
path: dist/artifacts/k3s-airgap-images-${{ matrix.arch }}.*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-k3s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
mv ./build/out/data-linux.tar.zst ./dist/artifacts/data-linux${{ env.ARCH_EXT }}.tar.zst

- name: "Upload K3s Artifacts"
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: k3s${{ env.ARCH_EXT }}
path: dist/artifacts/
88 changes: 45 additions & 43 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ jobs:
etest: [btrfs, embeddedmirror, externalip, privateregistry, rootless, s3, startup, wasm, multus]
max-parallel: 5
steps:
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
Expand All @@ -67,14 +86,14 @@ jobs:
uses: ./.github/actions/vagrant-setup
- name: Vagrant R/W Cache
if: matrix.etest != 'btrfs' && github.ref == 'refs/heads/main'
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.vagrant.d/boxes
key: ${{ matrix.etest != 'btrfs' && 'vagrant-box-ubuntu-2404' || 'vagrant-box-leap' }}
- name: Vagrant Read Cache
if: matrix.etest != 'btrfs' && github.ref != 'refs/heads/main'
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: |
~/.vagrant.d/boxes
Expand All @@ -88,28 +107,10 @@ jobs:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- name: "Download k3s binary"
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: k3s-amd64
path: ./dist/artifacts
- name: Remove Unnecessary Tools
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: Run ${{ matrix.etest }} Test
env:
E2E_GOCOVER: "true"
Expand All @@ -118,7 +119,7 @@ jobs:
cd tests/e2e/${{ matrix.etest }}
go test -timeout=45m ./${{ matrix.etest }}_test.go -test.v -ginkgo.v -ci -local
- name: On Failure, Upload Journald Logs
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
if: ${{ failure() }}
with:
name: e2e-${{ matrix.etest }}-logs
Expand Down Expand Up @@ -156,7 +157,7 @@ jobs:
mkdir -p ./dist/artifacts
go test -c -ldflags="-w -s" -o ./dist/artifacts ./tests/docker/...
- name: Upload Go Tests
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: docker-go-tests-${{ matrix.arch }}
path: ./dist/artifacts/*.test
Expand Down Expand Up @@ -202,10 +203,29 @@ jobs:
env:
CHANNEL: ${{ needs.build-go-tests.outputs.channel }}
steps:
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: Checkout
uses: actions/checkout@v6
- name: "Download K3s image"
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: k3s-${{ matrix.arch }}
path: ./dist/artifacts
Expand All @@ -225,28 +245,10 @@ jobs:
IMAGE_TAG=$(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep 'rancher/k3s')
echo "K3S_IMAGE=$IMAGE_TAG" >> $GITHUB_ENV
- name: Download Go Tests
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: docker-go-tests-${{ matrix.arch }}
path: ./dist/artifacts
- name: Remove Unnecessary Tools
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: Run ${{ matrix.dtest }} Test
# Put the compiled test binary back in the same place as the test source
run: |
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,8 @@ jobs:
env:
INSTALL_K3S_SKIP_DOWNLOAD: binary
steps:
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
- name: Set up vagrant and libvirt
uses: ./.github/actions/vagrant-setup
- name: "Vagrant Cache"
uses: actions/cache@v4
with:
path: |
~/.vagrant.d/boxes
key: vagrant-box-${{ matrix.vm }}
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
- name: "Download k3s binary"
uses: actions/download-artifact@v4
with:
name: k3s-amd64
path: tests/install/${{ matrix.vm }}
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
Expand All @@ -74,6 +57,24 @@ jobs:
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
- name: Set up vagrant and libvirt
uses: ./.github/actions/vagrant-setup
- name: "Vagrant Cache"
uses: actions/cache@v5
with:
path: |
~/.vagrant.d/boxes
key: vagrant-box-${{ matrix.vm }}
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
- name: "Download k3s binary"
uses: actions/download-artifact@v7
with:
name: k3s-amd64
path: tests/install/${{ matrix.vm }}
- name: "Vagrant Up"
run: vagrant up --no-tty --no-provision
- name: "Upload k3s binary to VM"
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,33 @@ jobs:
itest: [certrotation, cacertrotation, etcdrestore, localstorage, startup, custometcdargs, etcdsnapshot, kubeflags, longhorn, secretsencryption, flannelnone]
max-parallel: 3
steps:
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install Go
uses: ./.github/actions/setup-go
- name: "Download k3s binary"
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: k3s-amd64
path: ./dist/artifacts
Expand All @@ -65,7 +84,7 @@ jobs:
cd tests/integration/${{ matrix.itest }}
sudo -E env "PATH=$PATH" go test -timeout=45m ./... -run Integration -ginkgo.v -test.v
- name: On Failure, Upload Logs
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
if: ${{ failure() }}
with:
name: integration-${{ matrix.itest }}-logs
Expand Down Expand Up @@ -100,7 +119,7 @@ jobs:
- name: Install Go
uses: ./.github/actions/setup-go
- name: Download k3s binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: k3s-windows
path: dist/artifacts/
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/nightly-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,8 @@ jobs:
env:
INSTALL_K3S_CHANNEL: ${{ matrix.channel }}
steps:
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
- name: Set up vagrant and libvirt
uses: ./.github/actions/vagrant-setup
- name: "Vagrant Cache"
uses: actions/cache@v4
with:
path: |
~/.vagrant.d/boxes
key: vagrant-box-${{ matrix.vm }}
id: vagrant-cache
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
Expand All @@ -54,6 +43,18 @@ jobs:
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
- name: Set up vagrant and libvirt
uses: ./.github/actions/vagrant-setup
- name: "Vagrant Cache"
uses: actions/cache@v5
with:
path: |
~/.vagrant.d/boxes
key: vagrant-box-${{ matrix.vm }}
id: vagrant-cache
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s vagrant-reload
- name: "Vagrant Up ⏩ Install K3s"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
TRIVY_SHOW_SUPPRESSED: true

- name: Upload Trivy Report
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: trivy-report
path: trivy-report.txt
Expand All @@ -85,7 +85,7 @@ jobs:

steps:
- name: Download Trivy Report artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
if: needs.trivy_scan.result == 'success'
with:
name: trivy-report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
mv k3s.tar pr-context/k3s.tar

- name: Upload PR context artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: pr-context-for-scan
path: pr-context/
Expand Down
Loading