Skip to content

Commit 260209e

Browse files
authored
Resolves: MTV-3618 | VDDK init image archive upload fails when creating provider from All projects (#2066)
Signed-off-by: Aviv Turgeman <[email protected]>
1 parent 0f82b4c commit 260209e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ci/start-console.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if oc_available_loggedin && { [ -z "${INVENTORY_SERVER_HOST+x}" ] && [ -z "${SER
2929
routes=$(oc get routes -A -o template --template='{{range .items}}{{.spec.host}}{{"\n"}}{{end}}' 2>/dev/null || true)
3030
INVENTORY_SERVER_HOST="https://$(echo "$routes" | grep forklift-inventory)"
3131
SERVICES_API_SERVER_HOST="https://$(echo "$routes" | grep forklift-services)"
32-
OVA_PROXY_SERVER_HOST="https://$(echo "$routes" | grep forklift-ova-proxy)"
32+
OVA_PROXY_SERVER_HOST="https://$(echo "$routes" | grep forklift-ova-proxy || true)"
3333
fi
3434

3535
# Default API server hosts

src/components/VddkUploader/hooks/useVddkBuildImage.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { useActiveNamespace, useK8sWatchResource } from '@openshift-console/dynamic-plugin-sdk';
2+
import { Namespace } from '@utils/constants';
23
import { isEmpty } from '@utils/helpers';
4+
import { getDefaultNamespace } from '@utils/namespaces';
35

46
import type { VddkBuild } from '../utils/types';
57
import { getVddkImageBuildResponse } from '../utils/utils';
68

79
export const useVddkBuildImage = (buildName: string) => {
810
const [activeNamespace] = useActiveNamespace();
11+
const namespace =
12+
activeNamespace === Namespace.AllProjects ? getDefaultNamespace() : activeNamespace;
13+
914
const [vddkBuild] = useK8sWatchResource<VddkBuild>(
1015
buildName
1116
? {
@@ -15,7 +20,7 @@ export const useVddkBuildImage = (buildName: string) => {
1520
version: 'v1',
1621
},
1722
name: buildName,
18-
namespace: activeNamespace,
23+
namespace,
1924
}
2025
: null,
2126
);

0 commit comments

Comments
 (0)