Skip to content

Commit

Permalink
feat(bakery): add includeCRDs in Helm Bake request (#4324)
Browse files Browse the repository at this point in the history
Add new field `includeCRDs` in request to rosco in
order to include custom resource definitions manifests
in templated output.

Signed-off-by: Victor J. Diaz <[email protected]>

Signed-off-by: Victor J. Diaz <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
vjda and mergify[bot] authored Nov 8, 2022
1 parent 17f9633 commit 6fddc77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class HelmBakeManifestRequest extends BakeManifestRequest {
@JsonProperty("rawOverrides")
private Boolean rawOverrides;

@JsonProperty("includeCRDs")
private Boolean includeCRDs;

@JsonProperty("helmChartFilePath")
private String helmChartFilePath;

Expand All @@ -59,6 +62,7 @@ public HelmBakeManifestRequest(
this.setNamespace(bakeManifestContext.getNamespace());
this.setInputArtifacts(inputArtifacts);
this.setRawOverrides(bakeManifestContext.getRawOverrides());
this.setIncludeCRDs(bakeManifestContext.getIncludeCRDs());
this.setHelmChartFilePath(bakeManifestContext.getHelmChartFilePath());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class BakeManifestContext {
private final String outputName;
private final String namespace;
private final Boolean rawOverrides;
private final Boolean includeCRDs;
@Nullable private final String kustomizeFilePath;
@Nullable private final String helmChartFilePath;
// There does not seem to be a way to auto-generate a constructor using our current version of
Expand All @@ -52,7 +53,8 @@ public BakeManifestContext(
@Nullable @JsonProperty("inputArtifact") CreateBakeManifestTask.InputArtifact inputArtifact,
@Nullable @JsonProperty("kustomizeFilePath") String kustomizeFilePath,
@Nullable @JsonProperty("helmChartFilePath") String helmChartFilePath,
@JsonProperty("rawOverrides") Boolean rawOverrides) {
@JsonProperty("rawOverrides") Boolean rawOverrides,
@JsonProperty("includeCRDs") Boolean includeCRDs) {
this.inputArtifacts = Optional.ofNullable(inputArtifacts).orElse(new ArrayList<>());
// Kustomize stage configs provide a single input artifact
if (this.inputArtifacts.isEmpty() && inputArtifact != null) {
Expand All @@ -67,5 +69,6 @@ public BakeManifestContext(
this.kustomizeFilePath = kustomizeFilePath;
this.helmChartFilePath = helmChartFilePath;
this.rawOverrides = rawOverrides;
this.includeCRDs = includeCRDs;
}
}

0 comments on commit 6fddc77

Please sign in to comment.