Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4edc3b8
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 16, 2025
16de711
Bump actions/download-artifact from 6 to 7 (#13346)
dependabot[bot] Dec 22, 2025
001a7cd
Bump actions/cache from 4 to 5 (#13347)
dependabot[bot] Jan 5, 2026
aade452
Bump golangci-lint for go1.25
brandond Dec 12, 2025
0bd1e12
Add lint/validate job
brandond Dec 12, 2025
8b03bed
lint: file is not properly formatted
brandond Dec 15, 2025
35751e2
lint: redundant-build-tag
brandond Dec 15, 2025
93b4662
lint: use-any
brandond Dec 15, 2025
d9392da
lint: dot-imports
brandond Dec 15, 2025
fcc16b3
lint: comment-spacings
brandond Dec 15, 2025
73201f6
lint: deep-exit
brandond Dec 15, 2025
8585456
lint: bare-return
brandond Dec 15, 2025
1e69d34
lint: bool-literal-in-expr
brandond Dec 15, 2025
78ae44e
lint: defer,get-return
brandond Dec 15, 2025
4554b15
lint: duplicated-imports
brandond Dec 15, 2025
2faa240
lint: empty-lines
brandond Dec 15, 2025
9ec0289
lint: exported
brandond Dec 15, 2025
90faec7
lint: if-return
brandond Dec 15, 2025
944cf64
lint: import-alias-naming
brandond Dec 15, 2025
1bcdd78
lint: indent-error-flow
brandond Dec 15, 2025
699d9b7
lint: redefines-builtin-id
brandond Dec 15, 2025
4f914d3
lint: struct-tag
brandond Dec 15, 2025
8eb1b8e
lint: superfluous-else
brandond Dec 15, 2025
b06802f
lint: unchecked-type-assertion
brandond Dec 16, 2025
9e8641c
lint: unexported-naming
brandond Dec 16, 2025
befc715
lint: unexported-return
brandond Dec 16, 2025
2950a53
lint: unnecessary-stmt
brandond Dec 16, 2025
730001c
lint: useless-break
brandond Dec 16, 2025
69244ed
lint: identical-switch-branches
brandond Dec 16, 2025
5a27710
lint: unhandled-error
brandond Dec 16, 2025
bd064cb
lint: unnecessary-format,use-errors-new
brandond Dec 16, 2025
dc30b08
lint: nested-structs
brandond Dec 16, 2025
d0c9b21
Fix PR lint checkout depth
brandond Dec 18, 2025
f3853e2
Don't enforce use of wg.Go instead of Add/Done
brandond Dec 18, 2025
ba11e8d
Replace temporary etcd server with raw mvcc store access
brandond Dec 18, 2025
e934e3b
Fix etcd reconcile with empty TLS dirs
brandond Dec 19, 2025
f09b5c6
Add tests for etcd local reconcile
brandond Dec 19, 2025
0b152f7
Remove flannel external-ip annotations when disabled
brandond Jan 6, 2026
c611816
Bump CNI plugins
brandond Jan 7, 2026
461128d
Drop use of deprecated docker reexec package
brandond Jan 7, 2026
749a9ef
Fix atomic write in WriteSubnetFile
luojiyin1987 Dec 26, 2025
be68a90
Bump expr-lang/expr
brandond Jan 7, 2026
1d84881
Bump spegel to v0.6.0
brandond Nov 12, 2025
89a27ab
Add deferred store implimentation
brandond Nov 12, 2025
7aa4f60
Update longhorn version in integration test from v1.4.0 to v1.10.1
brandond Jan 8, 2026
bbae258
Bump kine for NATS conformance fixes
brandond Jan 7, 2026
30cda5e
Fix setup-go cache issues
brandond Jan 9, 2026
6210f56
Remove download/generate from vulncheck
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
4 changes: 0 additions & 4 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
uses: actions/checkout@v6
- name: Install Go
uses: ./.github/actions/setup-go
- name: Go Generate
run: |
./scripts/download
./scripts/generate
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
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
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
Expand Down
Loading