diff --git a/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeBakeManifestRequest.java b/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeBakeManifestRequest.java index c22235419..87e29775d 100644 --- a/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeBakeManifestRequest.java +++ b/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeBakeManifestRequest.java @@ -26,4 +26,5 @@ public class KustomizeBakeManifestRequest extends BakeManifestRequest { private Artifact inputArtifact; private String kustomizeFilePath; + private boolean enableHelm; } diff --git a/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeTemplateUtils.java b/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeTemplateUtils.java index c27a4076f..df624bacc 100644 --- a/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeTemplateUtils.java +++ b/rosco-manifests/src/main/java/com/netflix/spinnaker/rosco/manifests/kustomize/KustomizeTemplateUtils.java @@ -23,6 +23,7 @@ import com.netflix.spinnaker.rosco.jobs.BakeRecipe; import com.netflix.spinnaker.rosco.manifests.ArtifactDownloader; import com.netflix.spinnaker.rosco.manifests.BakeManifestEnvironment; +import com.netflix.spinnaker.rosco.manifests.BakeManifestRequest; import com.netflix.spinnaker.rosco.manifests.config.RoscoKustomizeConfigurationProperties; import com.netflix.spinnaker.rosco.manifests.kustomize.mapping.Kustomization; import java.io.File; @@ -132,6 +133,12 @@ private BakeRecipe buildBakeRecipeFromGitRepo( List command = new ArrayList<>(); command.add(executable); command.add("build"); + + if (request.isEnableHelm() + && request.getTemplateRenderer() == BakeManifestRequest.TemplateRenderer.KUSTOMIZE4) { + command.add("--enable-helm"); + } + command.add(env.resolvePath(kustomizeFilePath).getParent().toString()); BakeRecipe result = new BakeRecipe();