Skip to content

Commit

Permalink
Merge pull request #1477 from jpuzz0/MTV-2063-create-plan-fix
Browse files Browse the repository at this point in the history
[MTV-2063] Create plan wizard - a plan can't be created
  • Loading branch information
sgratch authored Feb 13, 2025
2 parents 38d9eed + 7a081d5 commit 9bebd42
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,17 @@ const handlers: {
[START_CREATE]({
flow,
receivedAsParams: { sourceProvider },
underConstruction: { plan, netMap, storageMap },
underConstruction: { plan, netMap, storageMap, projectName },
calculatedOnce: { sourceNetworkLabelToId, sourceStorageLabelToId },
calculatedPerNamespace: { networkMappings, storageMappings },
}) {
// triggered by the user
flow.editingDone = true;

netMap.metadata.namespace = projectName;
storageMap.metadata.namespace = projectName;
plan.metadata.namespace = projectName;

netMap.spec.map = networkMappings.map(({ source, destination }) => ({
source:
sourceNetworkLabelToId[source] === 'pod'
Expand All @@ -330,6 +335,7 @@ const handlers: {
? { type: 'pod' }
: { name: destination, namespace: plan.spec.targetNamespace, type: 'multus' },
}));

storageMap.spec.map = storageMappings.map(({ source, destination }) => {
if (sourceProvider?.spec?.type === 'openshift') {
return {
Expand Down

0 comments on commit 9bebd42

Please sign in to comment.