Skip to content

[v0.9] Update Kubernetes libraries to v1.28.12 v0.29.7 #980

[v0.9] Update Kubernetes libraries to v1.28.12 v0.29.7

[v0.9] Update Kubernetes libraries to v1.28.12 v0.29.7 #980

# Upgrade Fleet standalone from latest released to dev version
name: E2E Upgrade Fleet Standalone to HEAD
on:
schedule:
- cron: '0 8 */2 * *'
workflow_dispatch:
pull_request:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
jobs:
fleet-upgrade-test:
runs-on: ubuntu-latest
strategy:
matrix:
k3s_version:
- v1.27.5-k3s1
steps:
-
uses: actions/checkout@v4
with:
fetch-depth: 0
-
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
-
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Install Ginkgo CLI
run: go install github.com/onsi/ginkgo/v2/ginkgo
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Provision k3d Cluster
run: |
k3d cluster create upstream --wait \
--agents 1 \
--network "nw01" \
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Deploy Latest Release
run: |
./.github/scripts/deploy-fleet-latest-release.sh
-
name: Create example workload
run: |
kubectl apply -n fleet-local -f e2e/assets/single-cluster/bundle-diffs.yaml
-
name: Build Fleet Binaries
run: |
go build -o bin/fleetcontroller-linux-$GOARCH ./cmd/fleetcontroller
go build -o "bin/fleet-linux-$GOARCH" ./cmd/fleetcli
go build -o "bin/fleetagent-linux-$GOARCH" ./cmd/fleetagent
-
name: Build Docker Images
run: |
docker build -f package/Dockerfile -t rancher/fleet:dev --build-arg="ARCH=$GOARCH" .
docker build -f package/Dockerfile.agent -t rancher/fleet-agent:dev --build-arg="ARCH=$GOARCH" .
-
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev -c upstream
-
name: Verify Example Workload
run: |
# we waited long enough by importing the image first
kubectl get configmap -n bundle-diffs-example | grep -q -m 1 "app-config"
-
name: Upgrade to Dev Version
run: |
./.github/scripts/deploy-fleet.sh
-
name: Verify Installation
env:
FLEET_E2E_NS: fleet-local
run: |
ginkgo --label-filter="!multi-cluster" e2e/installation
-
name: Dump Failed Environment
if: failure()
run: |
./.github/scripts/dump-failed-k3ds.sh
-
name: Upload Logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: gha-fleet-e2e-logs-${{ github.sha }}-${{ matrix.k3s_version }}-${{ github.run_id }}
path: |
tmp/*.json
tmp/*.log
retention-days: 2