Skip to content

Commit

Permalink
fix topology failing to load after installing a Helm Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
debsmita1 committed Sep 22, 2020
1 parent 759c30d commit 59daaa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -24,8 +24,9 @@ export interface HelmReleaseResourcesProps {
const HelmReleaseResources: React.FC<HelmReleaseResourcesProps> = ({ match, customData }) => {
const namespace = match.params.ns;
const helmManifest = customData ? safeLoadAll(customData.manifest) : [];
const helmManifestResources: FirehoseResource[] = helmManifest.map(
(resource: K8sResourceKind) => {
const helmManifestResources: FirehoseResource[] = helmManifest
.filter((obj) => obj)
.map((resource: K8sResourceKind) => {
const resourceKind = referenceFor(resource);
const model = modelFor(resourceKind);
return {
Expand All @@ -36,8 +37,7 @@ const HelmReleaseResources: React.FC<HelmReleaseResourcesProps> = ({ match, cust
isList: false,
optional: true,
};
},
);
});
return (
<MultiListPage
filterLabel="Resources by name"
Expand Down
Expand Up @@ -164,7 +164,8 @@ const getHelmReleaseMap = (namespace: string) => {
.then((releases) =>
releases.reduce((acc, release) => {
try {
const manifestResources: K8sResourceKind[] = safeLoadAll(release.manifest);
let manifestResources: K8sResourceKind[] = safeLoadAll(release.manifest);
manifestResources = manifestResources.filter((obj) => obj);
manifestResources.forEach((resource) => {
const resourceKindName = getHelmReleaseKey(resource);
if (!acc.hasOwnProperty(resourceKindName)) {
Expand Down

0 comments on commit 59daaa0

Please sign in to comment.