Skip to content

Commit

Permalink
fix: Remove repository requirement to support oci helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
dsieradzki authored Feb 14, 2024
1 parent 052cc68 commit 8cdca24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions core/src/dispatcher/usecase/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,13 @@ pub(crate) mod apps {
.upgrade_or_install()
.create_namespace()
.namespace(&app.namespace)
.name(&app.release_name)
.chart(&app.chart_name, &app.chart_name);
.name(&app.release_name);

if app.repository.is_empty() {
command_builder = command_builder.chart(&app.chart_name);
} else {
command_builder = command_builder.chart_with_repo(&app.chart_name, &app.chart_name);
}

if !app.values.is_empty() {
command_builder =
Expand Down
7 changes: 6 additions & 1 deletion helm-client/src/command_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ impl InstallCommand {
res.parts.push(name.to_string());
res
}
pub fn chart(self, repo: &str, name: &str) -> Self {
pub fn chart(self, name: &str) -> Self {
let mut res = self;
res.parts.push(name.to_string());
res
}
pub fn chart_with_repo(self, repo: &str, name: &str) -> Self {
let mut res = self;
res.parts.push(format!("{}/{}", repo, name));
res
Expand Down

0 comments on commit 8cdca24

Please sign in to comment.