From 3510866c76a096d83355a95b64c5a262dc9211a9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 06:01:58 +0000 Subject: [PATCH] feat(helm/bake): Add additional input fields where we can fill in details of the APIs versions (#4546) (#4564) * feat(helm/bake): Add additional input fields where we can fill in details of the APIs versions - These input fields will not be pre-populated with versions of the target cluster available in the environment. - They will become part of the bake result. - Added API_VERSIONS_ENABLED env variable flag * feat(helm/bake): Add additional input fields where we can fill in details of the APIs versions - These input fields will not be pre-populated with versions of the target cluster available in the environment. - They will become part of the bake result. - Added API_VERSIONS_ENABLED env variable flag --------- Co-authored-by: ovidiupopa07 <105648914+ovidiupopa07@users.noreply.github.com> (cherry picked from commit cd9781f13438fc32aa6149c6adc04feddace3489) Co-authored-by: Krystian <24556350+ciurescuraul@users.noreply.github.com> --- .../api/manifests/helm/HelmBakeManifestRequest.java | 9 +++++++++ .../orca/bakery/tasks/manifests/BakeManifestContext.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/api/manifests/helm/HelmBakeManifestRequest.java b/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/api/manifests/helm/HelmBakeManifestRequest.java index 5c0ca5057f..77ab748db4 100644 --- a/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/api/manifests/helm/HelmBakeManifestRequest.java +++ b/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/api/manifests/helm/HelmBakeManifestRequest.java @@ -29,6 +29,13 @@ @Data @EqualsAndHashCode(callSuper = true) public class HelmBakeManifestRequest extends BakeManifestRequest { + + @JsonProperty("apiVersions") + private String apiVersions; + + @JsonProperty("kubeVersion") + private String kubeVersion; + @JsonProperty("namespace") private String namespace; @@ -59,6 +66,8 @@ public HelmBakeManifestRequest( outputArtifactName, bakeManifestContext.getOutputName()); this.setOverrides(overrides); + this.setApiVersions(bakeManifestContext.getApiVersions()); + this.setKubeVersion(bakeManifestContext.getKubeVersion()); this.setNamespace(bakeManifestContext.getNamespace()); this.setInputArtifacts(inputArtifacts); this.setRawOverrides(bakeManifestContext.getRawOverrides()); diff --git a/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/tasks/manifests/BakeManifestContext.java b/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/tasks/manifests/BakeManifestContext.java index 942fab4611..c81a72a841 100644 --- a/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/tasks/manifests/BakeManifestContext.java +++ b/orca-bakery/src/main/java/com/netflix/spinnaker/orca/bakery/tasks/manifests/BakeManifestContext.java @@ -33,6 +33,8 @@ public class BakeManifestContext { private final Boolean evaluateOverrideExpressions; private final String templateRenderer; private final String outputName; + private final String apiVersions; + private final String kubeVersion; private final String namespace; private final Boolean rawOverrides; private final Boolean includeCRDs; @@ -49,6 +51,8 @@ public BakeManifestContext( @JsonProperty("evaluateOverrideExpressions") Boolean evaluateOverrideExpressions, @JsonProperty("templateRenderer") String templateRenderer, @JsonProperty("outputName") String outputName, + @Nullable @JsonProperty("apiVersions") String apiVersions, + @Nullable @JsonProperty("kubeVersion") String kubeVersion, @JsonProperty("namespace") String namespace, @Nullable @JsonProperty("inputArtifact") CreateBakeManifestTask.InputArtifact inputArtifact, @Nullable @JsonProperty("kustomizeFilePath") String kustomizeFilePath, @@ -65,6 +69,8 @@ public BakeManifestContext( this.evaluateOverrideExpressions = evaluateOverrideExpressions; this.templateRenderer = templateRenderer; this.outputName = outputName; + this.apiVersions = apiVersions; + this.kubeVersion = kubeVersion; this.namespace = namespace; this.kustomizeFilePath = kustomizeFilePath; this.helmChartFilePath = helmChartFilePath;