Add optional route and federation fields to PluginManifest #2808
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kind E2E Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| env: | |
| # >= v0.31 is required: ci/kind-config.yml patches the apiserver with the kubeadm v1beta4 | |
| # schema (extraArgs as a list), which only applies to Kubernetes >= 1.31. | |
| KIND_VERSION: v0.32.0 | |
| jobs: | |
| check-changes: | |
| name: Check whether tests need to be run based on diff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: antrea-io/has-changes@v2 | |
| id: check_diff | |
| with: | |
| paths-ignore: docs/* *.md | |
| outputs: | |
| has_changes: ${{ steps.check_diff.outputs.has_changes }} | |
| e2e-tests: | |
| name: Run e2e tests using Kind | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.has_changes == 'yes' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Build container images | |
| run: make | |
| - name: Set up Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - name: Build @antrea/ui-plugin-sdk | |
| # pod-counter depends on it via a file: path (see its package.json), so its dist/ must | |
| # exist on disk before `npm ci` there resolves the import. @antrea/ui-components' dist/ | |
| # must exist first too: the sdk's tsc build resolves its types from there. | |
| working-directory: client/web | |
| run: | | |
| corepack enable | |
| yarn install --immutable | |
| yarn workspace @antrea/ui-components run build | |
| yarn workspace @antrea/ui-plugin-sdk run build | |
| - name: Build pod-counter example plugin | |
| working-directory: plugins/examples/pod-counter | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Install Kind | |
| run: | | |
| curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64 | |
| chmod +x ./kind | |
| sudo mv kind /usr/local/bin | |
| # Must run before the cluster is created: it writes the CA that ci/kind-config.yml mounts | |
| # into the control-plane node for the apiserver's --oidc-ca-file. | |
| - name: Start Dex | |
| run: ci/e2e-oidc.sh start-dex | |
| - name: Create Kind cluster | |
| run: | | |
| kind create cluster --config ci/kind-config.yml | |
| kind load docker-image antrea/antrea-ui-frontend:latest | |
| kind load docker-image antrea/antrea-ui-backend:latest | |
| - name: Install Antrea | |
| run: | | |
| helm repo add antrea https://charts.antrea.io | |
| helm repo update | |
| helm install --namespace kube-system antrea antrea/antrea | |
| kubectl rollout status -n kube-system ds/antrea-agent --timeout=5m | |
| # For e2e helm tests, Antrea UI should not be installed | |
| - name: Run e2e helm tests | |
| run: go test -v ./test/e2e_helm | |
| # Makes the Dex issuer resolvable from Pods, publishes its CA for the backend, and grants the | |
| # test identity its RBAC. Needs the cluster up, and Antrea UI not yet installed. | |
| - name: Configure cluster for OIDC | |
| run: ci/e2e-oidc.sh configure-cluster | |
| # We install Antrea UI with extra features enabled (OIDC, kubeconfig login) for better test | |
| # coverage; see the comments in ci/antrea-ui-values.yml. | |
| - name: Install Antrea UI | |
| run: | | |
| helm install --namespace kube-system antrea-ui \ | |
| -f ci/antrea-ui-values.yml \ | |
| --set hostAliases[0].ip="$(ci/e2e-oidc.sh dex-ip)" \ | |
| --set hostAliases[0].hostnames[0]=dex.e2e \ | |
| ./build/charts/antrea-ui | |
| kubectl rollout status -n kube-system deployment/antrea-ui --timeout=5m | |
| # The pod-counter example plugin is delivered as a labeled ConfigMap, the same mechanism a | |
| # real plugin deployment would use (see docs/plugins.md) — the backend's ConfigMap watch | |
| # picks it up with no antrea-ui restart. | |
| - name: Create example plugin ConfigMap | |
| run: | | |
| kubectl create configmap pod-counter-plugin --namespace kube-system \ | |
| --from-file=plugins/examples/pod-counter/dist/index.js \ | |
| --from-file=plugins/examples/pod-counter/dist/manifest.json | |
| kubectl label configmap pod-counter-plugin --namespace kube-system \ | |
| ui.antrea.io/plugin=true | |
| kubectl apply -f plugins/examples/pod-counter/clusterrole.yaml | |
| # For e2e tests, Antrea UI should be installed first | |
| - name: Run e2e tests | |
| run: go test -v ./test/e2e |