Skip to content

Commit

Permalink
chore(bors): merge pull request #494
Browse files Browse the repository at this point in the history
494: fix(upgrade-job): deserialize default when localpv chart is disabled r=niladrih a=niladrih

Local PV Hostpath will be installed as a chart alongside Mayastor, and not as a dependency of Mayastor in `openebs/openebs` v4.0.1. The deserialize fails when the chart is installed with helm v3.13+ because disabled dependency values are absent in the values set for those helm versions.

Co-authored-by: Niladri Halder <[email protected]>
  • Loading branch information
mayastor-bors and niladrih committed Apr 19, 2024
2 parents c6b81bc + 6ec1fec commit be1e8a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion k8s/upgrade/src/bin/upgrade-job/helm/chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ impl PromtailConfigClient {

/// This is used to deserialize the helm values of the localpv-provisioner helm chart.
#[derive(Default, Deserialize)]
#[serde(rename_all(deserialize = "camelCase"))]
#[serde(default, rename_all(deserialize = "camelCase"))]
struct LocalpvProvisioner {
release: LocalpvProvisionerRelease,
localpv: LocalpvProvisionerLocalpv,
Expand Down Expand Up @@ -1073,6 +1073,7 @@ impl LocalpvProvisioner {
/// chart.
#[derive(Default, Deserialize)]
struct LocalpvProvisionerRelease {
#[serde(default)]
version: String,
}

Expand All @@ -1087,6 +1088,7 @@ impl LocalpvProvisionerRelease {
/// This is used to deserialize the 'localpv' yaml object in the localpv-provisioner helm chart.
#[derive(Default, Deserialize)]
struct LocalpvProvisionerLocalpv {
#[serde(default)]
image: GenericImage,
}

Expand Down Expand Up @@ -1115,6 +1117,7 @@ impl GenericImage {
/// This is used to deserialize the 'helperPod' yaml object in the localpv-provisioner helm chart.
#[derive(Default, Deserialize)]
struct LocalpvProvisionerHelperPod {
#[serde(default)]
image: GenericImage,
}

Expand Down

0 comments on commit be1e8a6

Please sign in to comment.