From 3fd1a25c69e7bc06b1ca03510b7c4b6325081bd0 Mon Sep 17 00:00:00 2001 From: Yan Sun Date: Fri, 10 Apr 2026 14:41:28 -0700 Subject: [PATCH] =?UTF-8?q?chore:=20exclude=20.claude,=20tests/pytests,=20?= =?UTF-8?q?and=20knowledge=20folders=20from=20mar=E2=80=A6=20(#1326)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: exclude .claude, tests/pytests, and knowledge folders from markdown linting Add .claude, tests/pytests, and knowledge directories to markdownlint ignore patterns to prevent linting of test artifacts and AI-generated documentation. Co-Authored-By: Claude Opus 4.5 * docs: remove extra blank line in developer-guide.md Clean up formatting by removing an unnecessary blank line in the developer guide. Co-Authored-By: Claude Opus 4.5 * chore: add OCI, gocheck, and teardown to spellcheck wordlist Add technical terms to wordlist to resolve spellcheck failures in developer-guide.md. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 (cherry picked from commit 2fc32d2b31a16c76efa5f5727c5b211eabf1a831) --- .markdownlint-cli2.jsonc | 10 ++++- .wordlist.txt | 3 ++ docs/contributing/developer-guide.md | 67 ++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index aafd3602b..02a7a50fd 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -2,6 +2,14 @@ "globs": ["**/*.md"], "ignores": [ "**/vendor/**", - "**/.git/**" + "**/.git/**", + "**/ci-internal/**", + "**/docs/cicd/**", + "**/tests/e2e/**", + "**/helm-charts-k8s/README.md", + "**/internal-example/**", + "**/.claude/**", + "**/tests/pytests/**", + "**/knowledge/**" ] } diff --git a/.wordlist.txt b/.wordlist.txt index a45df5f8e..08be45a19 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1149,3 +1149,6 @@ hcrxm jlzbs nm xtwbm +OCI +gocheck +teardown diff --git a/docs/contributing/developer-guide.md b/docs/contributing/developer-guide.md index 5bf2f6cf7..d04f0ba0e 100644 --- a/docs/contributing/developer-guide.md +++ b/docs/contributing/developer-guide.md @@ -99,6 +99,73 @@ To run e2e test only: make -C tests/e2e # run e2e tests only ``` +## GPU Operator E2E Tests + +The `tests/k8s-e2e/` directory contains an e2e test suite that installs the GPU Operator via Helm and verifies metrics and health. Tests run against a live Kubernetes cluster. + +### Prerequisites + +- A running Kubernetes cluster with at least one AMD GPU node +- `kubectl` configured (`~/.kube/config` or a custom kubeconfig) +- Docker (to build the test runner image) + +### Test runner image + +```bash +docker build -t gpu-op-k8s-e2e:latest -f tests/k8s-e2e/Dockerfile.e2e tests/k8s-e2e/ +``` + +### Running tests + +#### Full install + verify + teardown + +Pass the helm chart as a local directory path (the `helm-charts-k8s/` directory in the repository root) or an OCI/repo reference if publishing to a registry: + +```bash +docker run --rm \ + -v /path/to/kubeconfig:/kubeconfig:ro \ + -v /path/to/gpu-operator/helm-charts-k8s:/helm-charts:ro \ + gpu-op-k8s-e2e:latest \ + -kubeconfig /kubeconfig \ + -operatorchart /helm-charts \ + -operatortag v1.5.0 \ + -test.timeout 60m +``` + +#### Verify only (pre-deployed cluster) + +```bash +docker run --rm -v /path/to/kubeconfig:/kubeconfig:ro \ + gpu-op-k8s-e2e:latest \ + -kubeconfig /kubeconfig -existing \ + -check.f 'TestOp010|TestOp020|TestOp030|TestOp040|TestOp050|TestOp060|TestOp065|TestOp070' \ + -test.timeout 30m +``` + +#### Using make + +```bash +# Full install+verify+teardown +make -C tests/k8s-e2e all KUBECONFIG=/path/to/kubeconfig OPERATOR_TAG=v1.5.0 + +# Verify only (pre-deployed) +make -C tests/k8s-e2e verify KUBECONFIG=/path/to/kubeconfig +``` + +### Common flags + +| Flag | Default | Description | +| --- | --- | --- | +| `-kubeconfig` | `~/.kube/config` | Path to kubeconfig | +| `-operatorchart` | OCI registry chart | GPU Operator helm chart (OCI ref or local path) | +| `-operatortag` | `v1.4.1` | GPU Operator chart version | +| `-namespace` | `kube-amd-gpu` | Kubernetes namespace | +| `-existing` | `false` | Skip install/teardown — verify only against pre-deployed cluster | +| `-noteardown` | `false` | Skip teardown after tests (leave operator installed) | +| `-helmset` | _(none)_ | Extra helm `--set` override (repeatable) | +| `-check.f` | _(all)_ | Regex filter for test names (gocheck syntax) | +| `-test.timeout` | `30m` | Overall test timeout | + ## Creating a Pull Request 1. Fork the repository on GitHub.