Skip to content

Commit

Permalink
Merge pull request kubevirt-ui#2186 from avivtur/bug-sysprep-crash-af…
Browse files Browse the repository at this point in the history
…ter-migrating-vms-from-mtv

CNV-48451: Windows autoattend.xml can not be created as a regular user
  • Loading branch information
openshift-merge-bot[bot] authored Sep 18, 2024
2 parents 6c8f8d2 + 241c160 commit c0adc9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/components/SysprepModal/hooks/useConfigMaps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ConfigMapModel, modelToGroupVersionKind } from '@kubevirt-ui/kubevirt-api/console';
import { IoK8sApiCoreV1ConfigMap } from '@kubevirt-ui/kubevirt-api/kubernetes';
import { isEmpty } from '@kubevirt-utils/utils/utils';
import { useK8sWatchResource, WatchK8sResult } from '@openshift-console/dynamic-plugin-sdk';

import { AUTOUNATTEND, UNATTEND } from '../sysprep-utils';
Expand All @@ -16,7 +17,10 @@ const useSysprepConfigMaps = (namespace: string): WatchK8sResult<IoK8sApiCoreV1C
namespace,
namespaced: true,
});

const sysprepConfigMaps = configmaps?.filter((configmap) => {
if (isEmpty(configmap?.data)) return false;

const dataKeys = Object.keys(configmap?.data);
const hasSysprepXMLData = dataKeys.some((key) => {
return (
Expand Down

0 comments on commit c0adc9f

Please sign in to comment.