Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
- name: Verify every docs link the UI Capture SDK ships
run: yarn verify-ui-capture-sdk-links

- name: Verify Kubernetes developer plan badges
run: yarn verify-developer-plan-badges

# A page moved or deleted with no redirect is not in src/redirects.js,
# so build the branch this PR goes into, set up the same way: the next
# step checks that every page in its sitemap still has its URL here.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"verify-linkedin-tag": "node scripts/verify-linkedin-tag.js build",
"verify-lastmod": "node scripts/verify-lastmod.js build",
"verify-ui-capture-sdk-links": "node scripts/verify-ui-capture-sdk-links.js build",
"verify-developer-plan-badges": "node scripts/verify-developer-plan-badges.js build",
"verify-moved-urls": "node scripts/verify-moved-urls.js build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand Down
127 changes: 127 additions & 0 deletions scripts/verify-developer-plan-badges.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// Verifies that Kubernetes developer-workflow pages carry the full plan badge
// ("Free, Teams, Scale, Enterprise") matching api-server's IntegrationTesting
// plan entitlements (Free, Teams, Scale, Enterprise), do not claim an
// Enterprise-only plan prerequisite on Kubernetes setup pages, and when a
// Docusaurus build directory is supplied, render all four plan chips in the
// built HTML.
//
// Usage: node scripts/verify-developer-plan-badges.js [build dir]
const fs = require("fs");
const path = require("path");

const REPO_ROOT = path.resolve(__dirname, "..");
const DEV_DIR = path.join(
REPO_ROOT,
"versioned_docs",
"version-4.0.0",
"developer"
);
const K8S_SETUP_FILES = [
path.join(
REPO_ROOT,
"versioned_docs",
"version-4.0.0",
"keploy-cloud",
"kubernetes.md"
),
path.join(
REPO_ROOT,
"versioned_docs",
"version-4.0.0",
"keploy-cloud",
"kubernetes-local-setup.md"
),
];

const WANT_BADGE =
'<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />';
const WANT_CHIPS = ["Free", "Teams", "Scale", "Enterprise"];
const FORBID_TEXT = /Keploy account on the Enterprise plan/i;

const errors = [];

const devFiles = fs
.readdirSync(DEV_DIR)
.filter((f) => f.endsWith(".md") || f.endsWith(".mdx"))
.sort()
.map((f) => path.join(DEV_DIR, f));

if (devFiles.length === 0) {
errors.push(`no markdown files found in ${DEV_DIR}`);
}

const allChecked = [...devFiles, ...K8S_SETUP_FILES];

for (const file of allChecked) {
const rel = path.relative(REPO_ROOT, file);
const src = fs.readFileSync(file, "utf8");
if (!src.includes(WANT_BADGE)) {
const match = src.match(/<ProductTier\b[^>]*>/);
errors.push(
`${rel}: expected ${WANT_BADGE}, found ${match ? match[0] : "(none)"}`
);
}
if (FORBID_TEXT.test(src)) {
errors.push(`${rel}: must not claim an Enterprise-only plan prerequisite`);
}
}

for (const allowanceFile of ["overview.md", "ci.md"]) {
const full = path.join(DEV_DIR, allowanceFile);
const rel = path.relative(REPO_ROOT, full);
const src = fs.readFileSync(full, "utf8");
if (!/10,000 tests run plus mocks used/i.test(src)) {
errors.push(
`${rel}: missing Free plan monthly allowance (10,000 tests run plus mocks used)`
);
}
}

const buildDir = process.argv[2] ? path.resolve(process.argv[2]) : null;
if (buildDir) {
for (const file of allChecked) {
const rel = path.relative(REPO_ROOT, file);
const idMatch = fs.readFileSync(file, "utf8").match(/^id:\s*(.+)$/m);
const slug = idMatch
? idMatch[1].trim()
: path.basename(file, path.extname(file));
const section = path.basename(path.dirname(file));
const htmlPath = path.join(buildDir, section, slug, "index.html");
if (!fs.existsSync(htmlPath)) {
errors.push(`${rel}: built HTML missing at ${htmlPath}`);
continue;
}
const html = fs.readFileSync(htmlPath, "utf8");
const chipBlockMatch = html.match(
/<div class="product-tier-chips">([\s\S]*?)<\/div>/
);
if (!chipBlockMatch) {
errors.push(`${rel}: built HTML missing .product-tier-chips block`);
continue;
}
const chipBlock = chipBlockMatch[1];
for (const chip of WANT_CHIPS) {
if (!chipBlock.includes(`>${chip}</span>`)) {
errors.push(`${rel}: built HTML missing plan chip "${chip}"`);
}
}
if (FORBID_TEXT.test(html)) {
errors.push(
`${rel}: built HTML still claims an Enterprise-only plan prerequisite`
);
}
}
}

if (errors.length > 0) {
console.error("Developer plan badge verification failed:");
for (const e of errors) {
console.error(` - ${e}`);
}
process.exit(1);
}

console.log(
`OK: ${allChecked.length} Kubernetes developer/setup pages verified` +
(buildDir ? ` (source + built HTML in ${buildDir})` : " (source)")
);
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/auto-replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
6 changes: 4 additions & 2 deletions versioned_docs/version-4.0.0/developer/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Run `keploy cloud replay` in your CI pipeline to replay your recorded tests against every pull request. When a pull request changes your app's behavior on purpose, some tests fail as expected. Keploy then creates a Keploy branch for the pull request, where you delete or edit those tests and get the change reviewed. When the pull request merges, Keploy merges the branch into main, so main's tests match the new behavior.

Every Keploy plan includes CI replay; the Free plan includes 10,000 tests run plus mocks used a month.

## Add Keploy to your pipeline

Run the replay on pull requests and on pushes to main. For example, with GitHub Actions:
Expand All @@ -51,7 +53,7 @@ jobs:
run: keploy cloud replay --app "<namespace>.<deployment>" --cluster "<cluster>" --image "<image>:<tag>"
```

- **API key:** create one under **Settings** → **API Keys** and store it as a CI secret. To merge pull requests' branches into main, the key needs the `branch:merge` permission on the app. A key that belongs to a CI account or a service account can create branches and replay, but it can't update a branch with main's changes, and it merges only approved branches.
- **API key:** create one under **Settings** → **API Keys** and store it as a CI secret. To merge pull requests' branches into main, the key needs the `branch:merge` permission on the app. A key that belongs to a CI account or a service account can create branches and replay, but it can't update a branch with main's changes, and it merges only approved branches. On the Free plan, use your own API key: a service account that can run `keploy cloud replay` needs a paid plan.
- **Image:** pass the image your pipeline built with `--image`, so the replay tests the pull request's code. To replay in the cluster instead of on the CI runner, add `--trigger`; the cluster must be able to pull the image. See [Run a manual replay](/docs/developer/manual-replay/#choose-how-to-replay).
- **Full history:** check out with full history (`fetch-depth: 0` on GitHub Actions). After a pull request merges, Keploy reads the git history to find it.

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/edit-test-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/manual-replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
4 changes: 3 additions & 1 deletion versioned_docs/version-4.0.0/developer/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Keploy turns real traffic to your Kubernetes deployments into tests. It records each request your app receives as a test case, and each call your app makes to a database or another service as a mock. It then replays those test cases against your app, with the mocks standing in for its dependencies, to catch regressions.

Every Keploy plan includes Kubernetes recording and replay; the Free plan includes 10,000 tests run plus mocks used a month.

This guide covers the developer workflow, from connecting a cluster to keeping your tests up to date.

![Recordings page for an app recorded with Keploy](/img/developer/recordings-overview.webp)
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/developer/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

<div className="developer-doc" hidden />

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/keploy-cloud/cloud-replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

## Overview

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.0.0/keploy-cloud/gitops-argocd.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

This guide walks you through deploying **Keploy's `k8s-proxy`** using **ArgoCD** (GitOps) on a Kubernetes cluster, with **Contour** as the ingress controller.

Expand All @@ -39,7 +39,7 @@ Ensure you have the following before you begin:
1. **A running Kubernetes cluster** (Kind, EKS, GKE, AKS)
2. **ArgoCD** installed on the cluster
3. **kubectl** and **Helm** installed
4. **Keploy account on the Enterprise plan** (with an access key)
4. **Keploy account** (any plan, including Free, with an access key)

---

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.0.0/keploy-cloud/gitops-flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

This guide walks you through deploying **Keploy's `k8s-proxy`** using **Flux CD** (GitOps) on a Kubernetes cluster, with **Contour** as the ingress controller.

Expand All @@ -40,7 +40,7 @@ Ensure you have the following before you begin:
2. **Flux CLI** installed ([installation guide](https://fluxcd.io/flux/installation/))
3. **kubectl** and **Helm** installed
4. **A Git repository** (GitHub, GitLab, Bitbucket) for Flux to watch
5. **Keploy account on the Enterprise plan** (with an access key)
5. **Keploy account** (any plan, including Free, with an access key)
6. **Contour** deployed ([see step 2 in the ArgoCD guide](/docs/keploy-cloud/gitops-argocd#2-deploy-contour-ingress-controller))

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

This guide walks you through creating a local **Kind** Kubernetes cluster and connecting it to **Keploy** using a **NodePort** (example: `30080`) so you can **live record and replay traffic** for Pods.

Expand All @@ -31,7 +31,7 @@ This guide walks you through creating a local **Kind** Kubernetes cluster and co

Ensure you have the following before you begin:

1. **Keploy account on the Enterprise plan** (with an access key)
1. **Keploy account** (any plan, including Free, with an access key)
2. **kubectl** configured to access your Kubernetes cluster
3. **Helm** installed
4. **Kind** installed
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.0.0/keploy-cloud/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

This guide walks you through creating a local **Kind** Kubernetes cluster and connecting it to **Keploy** using a **NodePort** (example: `30080`) so you can **live record and replay traffic** for Pods.

Expand All @@ -45,7 +45,7 @@ This guide walks you through creating a local **Kind** Kubernetes cluster and co

Ensure you have the following before you begin:

1. **Keploy account on the Enterprise plan** (with an access key)
1. **Keploy account** (any plan, including Free, with an access key)
2. **kubectl** configured to access your Kubernetes cluster
3. **Helm** installed
4. **Kind** installed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ keywords:
import ProductTier from '@site/src/components/ProductTier';
import useBaseUrl from '@docusaurus/useBaseUrl';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

Once recording works in your cluster, the next question is how your team edits test data without stepping on each other and how those edits land in `main` only after review. Keploy mirrors the git workflow: every change to a test case or a mock lives on a **Keploy branch**, a teammate reviews the diff in the dashboard, and CI replays the branch on every pull request before folding it into main on merge.

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.0.0/quickstart/k8s-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ text: "Use \"Use AI for Tests\" in the dashboard to expand coverage from the rec

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

This guide demonstrates how to use **Keploy Proxy** to perform **live traffic recording and replay in a Kubernetes environment**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

When Keploy records traffic in Kubernetes with eBPF, native TLS libraries
(OpenSSL, BoringSSL, Go `crypto/tls`) are captured directly at the library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

The **Keploy Kubernetes Proxy** runs as an in-cluster service that drives recording, replay, and observability for Deployments in one or more namespaces. Its REST API has two groups of routes:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

The Keploy Kubernetes Proxy supports two recording modes—**Sidecar** and **DaemonSet**—and two independent **auto-replay environments** that the same proxy can dispatch to. This page explains the moving parts of DaemonSet recording and then walks through both replay environments end to end.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:

import ProductTier from '@site/src/components/ProductTier';

<ProductTier tiers="Enterprise" offerings="Self-Hosted, Dedicated" />
<ProductTier tiers="Free, Teams, Scale, Enterprise" offerings="Self-Hosted, Dedicated" />

Keploy lets you configure **filters when starting a recording on any deployment**. Filters give you precise control over which requests get captured. You can limit recording to specific paths, methods, hosts, or headers, or explicitly exclude traffic you do not need.

Expand Down
Loading