diff --git a/.github/workflows/e2e-ci.yml b/.github/workflows/e2e-ci.yml index e4a47c60e0..64a7f43b9f 100644 --- a/.github/workflows/e2e-ci.yml +++ b/.github/workflows/e2e-ci.yml @@ -56,16 +56,15 @@ jobs: cd e2e/assets/gitrepo # Buildkit needed here for proper here-document support DOCKER_BUILDKIT=1 docker build -f Dockerfile.gitserver -t nginx-git:test --build-arg="passwd=$(openssl passwd foo)" . + - + 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 - uses: AbsaOSS/k3d-action@v2 - # k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - --agents 1 - --network "nw01" + run: | + k3d cluster create upstream --wait \ + --agents 1 \ + --network "nw01" \ --image docker.io/rancher/k3s:${{matrix.k3s_version}} - name: Import Images Into k3d diff --git a/.github/workflows/e2e-fleet-upgrade-ci.yml b/.github/workflows/e2e-fleet-upgrade-ci.yml index 982db8fddc..2fe61e05c4 100644 --- a/.github/workflows/e2e-fleet-upgrade-ci.yml +++ b/.github/workflows/e2e-fleet-upgrade-ci.yml @@ -31,16 +31,18 @@ jobs: - name: Install Ginkgo CLI run: go install github.com/onsi/ginkgo/v2/ginkgo + - + name: Install crust-gather CLI + run: curl -sSfL https://github.com/crust-gather/crust-gather/raw/main/install.sh | sh -s -- --yes + - + 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 - uses: AbsaOSS/k3d-action@v2 - # k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - --agents 1 - --network "nw01" + run: | + k3d cluster create upstream --wait \ + --agents 1 \ + --network "nw01" \ --image docker.io/rancher/k3s:${{matrix.k3s_version}} - name: Deploy Latest Release diff --git a/.github/workflows/e2e-multicluster-ci.yml b/.github/workflows/e2e-multicluster-ci.yml index ab2d7c172f..c5e9f06c9f 100644 --- a/.github/workflows/e2e-multicluster-ci.yml +++ b/.github/workflows/e2e-multicluster-ci.yml @@ -39,41 +39,35 @@ jobs: name: Build Docker Images run: | ./.github/scripts/build-fleet-images.sh + - + 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 - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - -p "80:80@agent:0:direct" - -p "443:443@agent:0:direct" - --api-port 6443 - --agents 1 + run: | + k3d cluster create upstream --wait \ + -p "80:80@agent:0:direct" \ + -p "443:443@agent:0:direct" \ + --api-port 6443 \ + --agents 1 \ --network "nw01" - name: Provision k3d Downstream Cluster for agent-initiated registration - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "downstream" - args: >- - -p "81:80@agent:0:direct" - -p "444:443@agent:0:direct" - --api-port 6644 - --agents 1 + run: | + k3d cluster create downstream --wait \ + -p "81:80@agent:0:direct" \ + -p "444:443@agent:0:direct" \ + --api-port 6644 \ + --agents 1 \ --network "nw01" - name: Provision k3d Downstream Cluster for manager-initiated registration - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "managed-downstream" - args: >- - -p "82:80@agent:0:direct" - -p "445:443@agent:0:direct" - --api-port 6645 - --agents 1 + run: | + k3d cluster create managed-downstream --wait \ + -p "82:80@agent:0:direct" \ + -p "445:443@agent:0:direct" \ + --api-port 6645 \ + --agents 1 \ --network "nw01" - name: Import Images Into k3d diff --git a/.github/workflows/e2e-nightly-ci.yml b/.github/workflows/e2e-nightly-ci.yml index 8854c93c74..44f61895fb 100644 --- a/.github/workflows/e2e-nightly-ci.yml +++ b/.github/workflows/e2e-nightly-ci.yml @@ -52,16 +52,15 @@ jobs: ./.github/scripts/build-fleet-images.sh DOCKER_BUILDKIT=1 docker build -f e2e/assets/gitrepo/Dockerfile.gitserver -t nginx-git:test --build-arg="passwd=$(openssl passwd foo)" e2e/assets/gitrepo + - + 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 - uses: AbsaOSS/k3d-action@v2 - # k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - --agents 1 - --network "nw01" + run: | + k3d cluster create upstream --wait \ + --agents 1 \ + --network "nw01" \ --image docker.io/rancher/k3s:${{matrix.k3s_version}} - name: Import Images Into k3d diff --git a/.github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml b/.github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml index 80cec5b22a..5c6411fabd 100644 --- a/.github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml +++ b/.github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml @@ -103,35 +103,32 @@ jobs: push: true tags: ${{ steps.meta-fleet-agent.outputs.tags }} labels: ${{ steps.meta-fleet-agent.outputs.labels }} + - + name: Install k3d + run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash - name: Set up k3d control-plane cluster - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - -p "80:80@agent:0:direct" - -p "443:443@agent:0:direct" - --api-port 6443 - --agents 1 - --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' - --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' - --network "nw01" + run: | + k3d cluster create upstream --wait \ + -p "80:80@agent:0:direct" \ + -p "443:443@agent:0:direct" \ + --api-port 6443 \ + --agents 1 \ + --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \ + --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \ + --network "nw01" \ --image docker.io/rancher/k3s:${{ env.SETUP_K3S_VERSION }} - name: Set up k3d downstream cluster - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "downstream" - args: >- - -p "81:80@agent:0:direct" - -p "444:443@agent:0:direct" - --api-port 6644 - --agents 1 - --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' - --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' - --network "nw01" + run: | + k3d cluster create downstream --wait \ + -p "81:80@agent:0:direct" \ + -p "444:443@agent:0:direct" \ + --api-port 6644 \ + --agents 1 \ + --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \ + --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \ + --network "nw01" \ --image docker.io/rancher/k3s:${{ env.SETUP_K3S_VERSION }} - name: Set up latest Rancher diff --git a/.github/workflows/e2e-rancher-upgrade-fleet.yml b/.github/workflows/e2e-rancher-upgrade-fleet.yml index 3c6aed8cf5..effb6b6a80 100644 --- a/.github/workflows/e2e-rancher-upgrade-fleet.yml +++ b/.github/workflows/e2e-rancher-upgrade-fleet.yml @@ -73,35 +73,32 @@ jobs: wget -q https://github.com/rancher/cli/releases/download/v2.6.0/rancher-linux-amd64-v2.6.0.tar.gz tar -xz --strip-components=2 -f rancher-linux-amd64-v2.6.0.tar.gz -C /home/runner/.local/bin rancher --version + - + name: Install k3d + run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash - name: Set up k3d control-plane cluster - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "upstream" - args: >- - -p "80:80@agent:0:direct" - -p "443:443@agent:0:direct" - --api-port 6443 - --agents 1 - --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' - --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' - --network "nw01" + run: | + k3d cluster create upstream --wait \ + -p "80:80@agent:0:direct" \ + -p "443:443@agent:0:direct" \ + --api-port 6443 \ + --agents 1 \ + --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \ + --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \ + --network "nw01" \ --image docker.io/rancher/k3s:${{github.event.inputs.k3s_version}} - name: Set up k3d downstream cluster - uses: AbsaOSS/k3d-action@v2 - with: - k3d-version: ${{ env.SETUP_K3D_VERSION }} - cluster-name: "downstream" - args: >- - -p "81:80@agent:0:direct" - -p "444:443@agent:0:direct" - --api-port 6644 - --agents 1 - --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' - --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' - --network "nw01" + run: | + k3d cluster create downstream --wait \ + -p "81:80@agent:0:direct" \ + -p "444:443@agent:0:direct" \ + --api-port 6644 \ + --agents 1 \ + --k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \ + --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \ + --network "nw01" \ --image docker.io/rancher/k3s:${{github.event.inputs.k3s_version}} - name: Set up Rancher