storage-map

A controller that checks and maintains mappings between storage in a source system and OpenShift storage classes, which define how application data is stored. It supports matching storage by inventory ID or name and assigning volume settings.

In plain words
What is it for?
Use it to configure source-to-target storage mappings and optional offload settings for VM disk migration.
Why use it?
It catches invalid storage mappings before virtual-machine disks are migrated to OpenShift.

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/storage-map
Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,695 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.00016 $0.02695
Opus 5 $0.00008 $0.01347
Sonnet 5 $0.00003 $0.00539
Haiku 4.5 $0.00002 $0.00269

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

Security

Grade A, and why

storage-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/storage-map.mdc · 263 lines

How it starts

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

StorageMap Controller

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

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


Overview

The StorageMap controller reconciles StorageMap CRs (forklift.konveyor.io/v1beta1). Each StorageMap defines how source provider storage maps to target OpenShift StorageClasses for VM disk 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 storage
        id: "<inventory-id>"            # match by ID
        name: "<storage-name>"          # OR match by name (path suffix)
      destination:
        storageClass: "<sc-name>"       # target StorageClass name
        volumeMode: "Filesystem" | "Block"        # optional
        accessMode: "ReadWriteOnce" | "ReadWriteMany" | "ReadOnlyMany"  # optional
      offloadPlugin:                    # optional — per-pair offload config
        vsphereXcopyConfig:             # prefer a single plugin; if both populated, UI resolves CSI first
          secretRef: "<secret-name>"
          storageVendorProduct: "<vendor>"
        # csiVolumeImport:              # CSI Volume Import (MTV-5483); takes precedence when both are set
        #   secretRef: "<secret-name>"
        #   storageVendorProduct: "primera3par"

Destination Fields

Field Required Values Purpose
storageClass Yes Any valid SC name Target StorageClass on OpenShift
volumeMode No Filesystem, Block PVC volume mode
accessMode No ReadWriteOnce, ReadWriteMany, ReadOnlyMany PVC access mode

Reconciliation Flow

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

Read the full file on GitHub · 263 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 · 263 lines · 16 tokens per session scan A cd9a3311ae85

Subscribe to this mod's changes

storage-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 16 tokens to every session and 2,695 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.