Skip to content

Commit

Permalink
fix: handling HelmRelease resources without a reconciler (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlocph authored Mar 7, 2024
1 parent ddacd44 commit 22233fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/Service.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,15 @@ function Service(props) {
</div>
</div>
} */}
{ kustomization && source &&
<div>
<p className="text-base text-neutral-600">Sync</p>
<div className="flex text-sm text-neutral-600">
<div className="ml-4"><ReadyWidget resource={kustomization} label="Applied" /></div>
<div className="ml-2 field flex-1"><RevisionWidget kustomization={kustomization} source={source} handleNavigationSelect={handleNavigationSelect} /></div>
</div>
</div>
}
{ helmRelease &&
<div>
<p className="text-base text-neutral-600">Helm Status</p>
Expand Down
4 changes: 4 additions & 0 deletions web/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import jp from 'jsonpath'

export function findSource(sources, reconciler) {
if (!reconciler) { // HelmReleases can be applied on the cluster manually => no reconciler
return undefined
}

let namespace = reconciler.metadata.namespace
if (reconciler.spec.sourceRef.namespace) { // namespace is not mandatory
namespace = reconciler.spec.sourceRef.namespace
Expand Down

0 comments on commit 22233fc

Please sign in to comment.