Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handling HelmRelease resources without a reconciler #67

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading