diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 000000000..e6d776fc1 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,31 @@ +name: E2E +on: + pull_request: + push: +jobs: + e2e-test: + runs-on: ubuntu-22.04 + name: E2E Test + timeout-minutes: 40 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build Clusters + uses: helm/kind-action@v1.8.0 + with: + version: v0.18.0 + install_only: true + run: | + hack/local-dev-setup.sh + - name: Install Helm + uses: azure/setup-helm@v3 + with: + version: v3.10.1 + - name: Install Kubectl + uses: actions-hub/kubectl@1.27.3 + - name: Init kurator cluster + run: | + test/install.sh + - name: fleet-clusters e2e test + run: | + test/fleet-clusters/e2e-run.sh diff --git a/hack/e2e-test/fleet-clusters/attachedcluster.sh b/hack/e2e-test/fleet-clusters/attachedcluster.sh new file mode 100755 index 000000000..033945644 --- /dev/null +++ b/hack/e2e-test/fleet-clusters/attachedcluster.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +KUBECONFIG_PATH=${KUBECONFIG_PATH:-"${HOME}/.kube"} +MAIN_KUBECONFIG=${MAIN_KUBECONFIG:-"${KUBECONFIG_PATH}/kurator-host.config"} +export KUBECONFIG=${MAIN_KUBECONFIG} + +kubectl create secret generic kurator-member1 --from-file=kurator-member1.config=${KUBECONFIG_PATH}/kurator-member1.config +kubectl create secret generic kurator-member2 --from-file=kurator-member2.config=${KUBECONFIG_PATH}/kurator-member2.config + +cat <