gke-e2e-testing
Skill10 starsChanged 4 months agoApache-2.0View on GitHub
Guides on provisioning GKE clusters (e.g. n2-standard-64) with Workload Identity and GCSFuse CSI Driver addon enabled, enforcing isolated KUBECONFIG policy, configuring gcs-fuse-csi-driver test suite, executing end-to-end (e2e) tests, and parsing Ginkgo test outputs into conformance_results_<TARGET_NAME>.json.
- Installs packages
In this repository9 other files it gives its agents.
- npi/.agents/AGENTS.mdAGENTS.md
- analysis-report-generationSkill
- benchmark-build-setupSkill
- benchmark-suite-executionSkill
- bucket-creationSkill
- conformance-testingSkill
- remediation-advisorSkill
- run-gcsfuse-npiSkill
- ssh-connection-managementSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 66
Verify active context and node readiness:
- Distinctive: line 73
If cluster creation is explicitly requested by the user, provision the cluster with GCSFuse CSI Driver and Workload Identity enabled:
- Very specific: line 165
Verify test output ends with PASS and summary metrics showing zero unexpected failures.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GCSFuse End-to-End (E2E) Conformance Testing on GKE
This skill guides you through configuring strict isolated KUBECONFIG sessions, setting up the GCSFuse CSI Driver test environment, executing the GCSFuse end-to-end (E2E) conformance test suite using Ginkgo on GKE cluster targets, and generating conformance_results_<TARGET_NAME>.json.
[!IMPORTANT] Mandatory Execution Policy: GKE E2E conformance testing is mandatory by default during NPI qualification for GKE targets. It must ALWAYS be executed to validate functional correctness and POSIX integration unless the user explicitly requests to exclude or skip conformance testing.
Prerequisites & Trigger Conditions
Prerequisites
- GCP Project Access & Permissions: Local environment configured with
gcloud,kubectl, andgo(1.24+) CLI tools with permissions to create GKE clusters (container.clusters.create), storage buckets (storage.buckets.create), and IAM service accounts (resourcemanager.projects.get). - KUBECONFIG Isolation Policy: Standard policy enforcing
mkdir -p ~/.kube && export KUBECONFIG=~/.kube/npi_kubeconfigfor all cluster interactions andkubectloperations, ensuring the host default~/.kube/configremains completely unmutated. - GCSFuse CSI Driver Repository: Repository clone of
gcs-fuse-csi-driver(e.g. at~/gitproj/gcs-fuse-csi-driveror local workspace). - Ginkgo Test Framework:
ginkgov2.27.0+ installed (go install github.com/onsi/ginkgo/v2/ginkgo@v2.27.0).
Trigger Conditions
- Triggered when validating functional correctness, POSIX compatibility, and E2E integration of GCSFuse on GKE clusters.
- Executed during Stage 2 (Conformance & Integration Testing) of the NPI pipeline on GKE cluster targets.
- Used to test GCSFuse CSI Driver volume mounting, bucket creation, file caching, kernel list cache, and workload identity integration.
Input/Output Contract
Inputs
PROJECT_ID: GCP Project ID (e.g.gcs-fuse-test).CLUSTER_NAME: Name of the target GKE cluster (e.g.gcsfuse-n2s64-e2e-cluster).ZONE_OR_REGION: GCP Zone or Region (e.g.us-central1-c).MACHINE_TYPE: Worker node machine type (e.g.n2-standard-64orct6e-standard-4t).E2E_TEST_USE_GKE_MANAGED_DRIVER: Set totruewhen testing against GKE pre-installed GCSFuse CSI driver.E2E_TEST_GINKGO_PROCS: Parallel test worker count (default:5).
Outputs
- GKE Cluster: Active GKE cluster with Workload Identity and GCSFuse CSI Driver addon enabled.
- Kubeconfig Context: Isolated context configured in
~/.kube/npi_kubeconfig. - E2E Test Execution Logs: Ginkgo test logs showing test spec status (Pass/Fail/Skip).
- Deliverable:
conformance_results_<TARGET_NAME>.jsoncontaining parsed E2E test results, summaries, and individual test cases.
Step-by-Step Procedure
Step 1: Connect to Provided GKE Cluster with Strict KUBECONFIG Isolation
[!NOTE] Existing Cluster Default: GKE clusters are typically pre-provisioned or provided in
targets.json/ user request. Do not auto-create a new cluster unless explicitly instructed by the user.
- Enforce isolated KUBECONFIG environment:
mkdir -p ~/.kube && export KUBECONFIG=~/.kube/npi_kubeconfig - Fetch cluster credentials for the target cluster into isolated KUBECONFIG:
export KUBECONFIG=~/.kube/npi_kubeconfig gcloud container clusters get-credentials <CLUSTER_NAME> --project=<PROJECT_ID> --location=<ZONE_OR_REGION> - Verify active context and node readiness:
kubectl config current-context kubectl get nodes -o wide
Step 2: On-Demand Cluster Provisioning (Optional - If Explicitly Requested)
If cluster creation is explicitly requested by the user, provision the cluster with GCSFuse CSI Driver and Workload Identity enabled:
gcloud container clusters create <CLUSTER_NAME> \
--project=<PROJECT_ID> \
--location=<ZONE_OR_REGION> \
--machine-type=<MACHINE_TYPE> \
--num-nodes=1 \
--addons=GcsFuseCsiDriver \
--workload-pool=<PROJECT_ID>.svc.id.googStep 3: Configure Environment for GCSFuse E2E Suite
Navigate to the gcs-fuse-csi-driver repository directory:
cd /path/to/gcs-fuse-csi-driverSet necessary environment variables:
export KUBECONFIG=~/.kube/npi_kubeconfig
export E2E_TEST_USE_GKE_MANAGED_DRIVER=true
export E2E_TEST_GINKGO_PROCS=5Step 4: Execute GCSFuse E2E Test Suite
Launch the complete E2E test suite using make:
make e2e-testAlternatively, to run selective test suites focusing specifically on FUSE kernel behavior (kernel parameters, dentry cache, readdirplus, negative stat cache, read cache, process interrupts, and volume mounting) with an extended timeout:
export KUBECONFIG=~/.kube/npi_kubeconfig
export E2E_TEST_USE_GKE_MANAGED_DRIVER=true
export ENABLE_GCSFUSE_KERNEL_PARAMS=true
export E2E_TEST_GINKGO_TIMEOUT=8h
export E2E_TEST_FOCUS="kernelParams|kernel_list_cache|dentry_cache|readdirplus|negative_stat_cache|read_cache|buffered_read|interrupt|stale_handle|local_file|streaming_writes|concurrent_operations|operations|file_cache|rename_symlink|volumes|mount"
export E2E_TEST_SKIP="multivolume|list_large_dir|should.succeed.in.performance.test|oidc"
export E2E_TEST_GINKGO_PROCS=5
make e2e-testTo skip stress/scale tests (list_large_dir), multi-node tests (multivolume on single-node clusters), or long-running performance suites:
export E2E_TEST_SKIP="multivolume|list_large_dir|should.succeed.in.performance.test|oidc"
make e2e-testStep 5: Clean Up Resources Post-Test
- Namespace & Test Resource Cleanup (Default):
Clean up any leftover test namespaces or pods:
export KUBECONFIG=~/.kube/npi_kubeconfig kubectl get ns | grep gcsfuse-integration | awk '{print $1}' | xargs -r kubectl delete ns Optional: Cluster Deletion (Only if Dynamically Created):
[!CAUTION] Do NOT delete pre-existing or shared GKE clusters. Cluster deletion must only be executed if the cluster was dynamically provisioned specifically for this test run.
export KUBECONFIG=~/.kube/npi_kubeconfig gcloud container clusters delete <CLUSTER_NAME> --project=<PROJECT_ID> --location=<ZONE_OR_REGION> --quiet
Failure Modes & Edge Cases
| Failure Scenario | Root Cause | Recovery / Remediation Action | |||
| Host KUBECONFIG Overwritten | gcloud container clusters get-credentials executed without setting KUBECONFIG | Always execute mkdir -p ~/.kube && export KUBECONFIG=~/.kube/npi_kubeconfig before running any gcloud or kubectl commands. | |||
| CSI Driver Pod Crash | GCSFuse CSI driver addon disabled on cluster | Verify CSI driver status: kubectl get pods -n kube-system -l app=gcs-fuse-csi-driver. If missing, update cluster: gcloud container clusters update <CLUSTER_NAME> --update-addons GcsFuseCsiDriver=ENABLED. | |||
| Ginkgo Parallel Lock Contention | High process count (E2E_TEST_GINKGO_PROCS) causing API server rate limiting | Reduce process count: export E2E_TEST_GINKGO_PROCS=2 or 5. | |||
| Stale Test Namespaces / Buckets | Test aborted mid-run leaving lingering test namespaces (gcsfuse-integration-*) | Run manual cleanup: `kubectl get ns | grep gcsfuse-integration | awk '{print $1}' | xargs -r kubectl delete ns`. |
Verification Checks
- Cluster Context Verification:
kubectl config current-context | grep "<CLUSTER_NAME>" - CSI Driver DaemonSet Check:
kubectl get ds gcs-fuse-csi-driver-node -n kube-system - Ginkgo Test Result Check:
Verify test output ends with
PASSand summary metrics showing zero unexpected failures.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

