feat(v2): add mtv_maps role for StorageMap and NetworkMap CRs - #80
Draft
tech2734 wants to merge 3 commits into
Draft
feat(v2): add mtv_maps role for StorageMap and NetworkMap CRs#80tech2734 wants to merge 3 commits into
tech2734 wants to merge 3 commits into
Conversation
Implements a new role that creates Forklift/MTV StorageMap and NetworkMap custom resources on target OpenShift clusters. Queries the MTV inventory for datastores, storage classes, networks, and NADs, then builds and applies the mapping CRs. Features: - Single or multiple named storage maps with per-datastore overrides - Network map with annotation-based NAD auto-matching - Include/exclude filtering for both storage and network entries - Default storage class auto-detection - Block/rescue error handling with diagnostic output - Full argument_specs validation - aap_seed integration with new job template definition Tested against homelab environment: - StorageMap: 9 datastore mappings created successfully - NetworkMap: 4 network mappings created successfully - Idempotent apply via server-side merge Co-authored-by: Cursor <cursoragent@cursor.com>
7 tasks
Add title, required, and description comment blocks above each variable in defaults/main.yml to enable docsible README generation, matching the pattern established in mtv_query_inventory. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
Replace hardcoded app.kubernetes.io/managed-by value with mtv_maps_managed_by_label variable, consistent with the approach in mtv_provider (PR redhat-cop#82). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mtv_mapsrole that creates Forklift/MTV StorageMap and NetworkMap custom resources on target OpenShift clustersmtv_query_inventory) for datastores, storage classes, networks, and NADs, then builds and applies the mapping CRsaap_seedby adding a new "MTV Maps" job template definitionKey Features
infra.openshift-virtualization-migration/source-portgroup)argument_specsvalidation (17 documented parameters)Dependencies
mtv_query_inventoryrole (feat(v2): MTV query inventory role #75) for MTV inventory queriesrfc1123filter from the collectionTest Plan
ok=88 changed=2 failed=0 rescued=0Note on
mtv_query_inventoryendpoint regexDuring testing, the
mtv_query_inventoryrole's endpoint path validation regex was found to reject query parameters (?detail=4). This needs to be addressed in PR #75 before this role can work end-to-end from AAP.