wiremock-api-mocks

Deploy and operate WireMock as a shared cluster-wide HTTP mock server on Kubernetes.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/lurodrisilva/personal-skills --skill wiremock-api-mocks-lurodrisilva
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wiremock-api-mocks
Source: https://github.com/lurodrisilva/personal-skills/tree/main/platform-engineering/wiremock-api-mocks
Command: npx skills add https://github.com/lurodrisilva/personal-skills --skill wiremock-api-mocks-lurodrisilva

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams running Kubernetes test and preview environments need to stub external HTTP dependencies without deploying a mock server per application, and without stub collisions or cross-team interference on shared infrastructure. ## Core Features & Use Cases - Shared WireMock addon chart: Packages WireMock as a baseline addon in the testing-system namespace with a single-replica Recreate Deployment, NetworkPolicy gating by consumer label, and production gating defaulted off. - Declarative per-release stubs: Consumer apps declare stubs in Helm values; library helpers (myorg.wiremock.syncJob, stubsConfigMap, cleanupJob) register them via the WireMock Admin API with metadata.owner=<release> tagging and /__mocks__/<release>/ URL-prefix isolation for atomic replace. - WireMock.Net boundary guidance: Distinguishes the shared Java WireMock cluster instance from in-process WireMock.Net servers for xUnit unit tests, including fixture and stubbing examples. - Use Case: A platform engineer adds addon_charts/wiremock/ to the GitOps repo, then a consumer service sets mocks.wiremock.enabled: true with stub entries in values-test.yaml and gets its mocks registered automatically on the next ArgoCD sync. ## Quick Start Ask the AI to add a shared WireMock addon chart and wire a consumer Helm chart to register its stub mappings in the testing-system namespace.

Frequently Asked Questions about wiremock-api-mocks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a shared WireMock mock server in Kubernetes?▼

Deploy WireMock as a baseline addon chart in a dedicated testing-system namespace with a single-replica Recreate Deployment and ClusterIP Service. Consumers register stubs via the Admin API using a Helm-hooked sync Job rather than running per-app sidecars.

How to register WireMock stub mappings from Helm values?▼

Declare stubs under mocks.wiremock.stubs in the consumer chart's values, then include the myorg.wiremock.stubsConfigMap and syncJob helpers. The Job POSTs mappings to /__admin/mappings/import on install and upgrade, tagged with metadata.owner for atomic per-release replace.

WireMock vs WireMock.Net — which should I use?▼

Use the Java wiremock/wiremock image for the shared cluster instance that Helm-deployed apps call over DNS. Use WireMock.Net only in-process for dotnet test unit tests via WireMockServer.Start(); never containerize it as the cluster mock server.

Why did my app's WireMock stubs disappear after another app's upgrade?▼

Stubs vanish when a consumer calls /__admin/reset or removes mappings without a metadata.owner matcher, wiping other tenants' stubs. Every mapping must be tagged metadata.owner=<release-fullname> and cleanup must filter on that owner.

Can WireMock run with multiple replicas in Kubernetes?▼

No, not without sticky-session affinity, because WireMock keeps mappings in memory and replicas diverge. The skill mandates replicaCount 1 with a Recreate strategy so upgrades never run two replicas with different stub maps.

Should I enable WireMock recording on a shared instance?▼

No. Recording is disabled on multi-tenant instances because captured traffic is a data-leak vector across consumers. Set recordingMode to never and rely on declarative stubs reproducible from Helm values instead.