network-map

A controller that maps networks from a source system to networks in OpenShift, the Kubernetes platform used as the migration target. Each mapping can use the default pod network, a Multus network attachment, or no network.

In plain words
What is it for?
Use it to define source-to-target network mappings and select the OpenShift namespace and network attachment for Multus connections.
Why use it?
It checks that the network choices needed by a migrated virtual machine are valid before migration.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/network-map
Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,806 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01806
Opus 5 $0.00006 $0.00903
Sonnet 5 $0.00002 $0.00361
Haiku 4.5 $0.00001 $0.00181

Measured 2d ago against content hash 6b0626b11046, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

network-map scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/backend/mappings/network-map.mdc · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NetworkMap Controller

Analyzed from commit: 412c71822 on 2026-05-04

Source: pkg/controller/map/network/ in the forklift repo.


Overview

The NetworkMap controller reconciles NetworkMap CRs (forklift.konveyor.io/v1beta1). Each NetworkMap defines how source provider networks map to target OpenShift networks for VM migration.


Mapping Structure

spec:
  provider:
    source:   { namespace, name }      # ref to source Provider CR
    destination: { namespace, name }   # ref to destination Provider CR (must be OpenShift)
  map:
    - source:                          # ref.Ref — identifies source network
        id: "<inventory-id>"           # match by ID
        name: "<network-name>"         # OR match by name (path suffix)
      destination:
        type: "pod" | "multus" | "ignored"
        namespace: "<ns>"              # required when type=multus
        name: "<nad-name>"            # NAD name when type=multus

Destination Types

Type Meaning Validation
pod Kubernetes pod network (default CNI) Skipped — always valid
multus Multus NetworkAttachmentDefinition (NAD) Looked up via inventory; namespace required
ignored Network is excluded from mapping Skipped — always valid

Reconciliation Flow

Reconcile()
 ├─ Fetch NetworkMap CR (return if NotFound)
 ├─ BeginStagingConditions()
 ├─ validate(mp)
 │   ├─ ProviderPair.Validate() — validate source + destination providers
 │   │   └─ Short-circuit if any provider condition is set
 │   ├─ validateSource(mp) — check source networks against inventory
 │   └─ validateDestination(mp) — check destination networks against inventory
 ├─ Set Ready condition (if no blocker conditions)
 ├─ EndStagingConditions()
 ├─ Record Kubernetes events
 └─ Update status (ObservedGeneration = Generation)

Validation Detail

Provider Pair Validation (shared with StorageMap)

Uses validation.ProviderPair from pkg/controller/validation/provider.go:

Read the full file on GitHub · 182 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 182 lines · 12 tokens per session scan A 6b0626b11046

Subscribe to this mod's changes

network-map is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed 3d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,806 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other cursor rules, from other repositories