From f030be4168c19f0cf8f6e5479f00f26a1491a9b7 Mon Sep 17 00:00:00 2001 From: Niladri Halder Date: Thu, 28 Nov 2024 08:59:12 +0000 Subject: [PATCH] chore: bump localpv-provisioner dependency version to 4.1.2 Signed-off-by: Niladri Halder --- chart/Chart.yaml | 2 +- chart/README.md | 2 +- k8s/upgrade/src/bin/upgrade-job/common/constants.rs | 3 +++ k8s/upgrade/src/bin/upgrade-job/helm/values.rs | 13 ++++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 42e4835c2..17f9ad3ea 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -45,6 +45,6 @@ dependencies: repository: https://nats-io.github.io/k8s/helm/charts/ condition: eventing.enabled - name: localpv-provisioner - version: 4.1.0 + version: 4.1.2 repository: https://openebs.github.io/dynamic-localpv-provisioner condition: localpv-provisioner.enabled diff --git a/chart/README.md b/chart/README.md index c15ea06d3..b61c753c9 100644 --- a/chart/README.md +++ b/chart/README.md @@ -59,7 +59,7 @@ This removes all the Kubernetes components associated with the chart and deletes | https://grafana.github.io/helm-charts | loki-stack | 2.9.11 | | https://jaegertracing.github.io/helm-charts | jaeger-operator | 2.50.1 | | https://nats-io.github.io/k8s/helm/charts/ | nats | 0.19.14 | -| https://openebs.github.io/dynamic-localpv-provisioner | localpv-provisioner | 4.1.0 | +| https://openebs.github.io/dynamic-localpv-provisioner | localpv-provisioner | 4.1.2 | ## Values diff --git a/k8s/upgrade/src/bin/upgrade-job/common/constants.rs b/k8s/upgrade/src/bin/upgrade-job/common/constants.rs index a4c87a022..293802e6c 100644 --- a/k8s/upgrade/src/bin/upgrade-job/common/constants.rs +++ b/k8s/upgrade/src/bin/upgrade-job/common/constants.rs @@ -54,3 +54,6 @@ pub(crate) const TWO_DOT_FIVE: &str = "2.5.0"; /// Version value for the earliest possible 2.6 release. pub(crate) const TWO_DOT_SIX: &str = "2.6.0"; + +/// Version value for 2.7.2 release. +pub(crate) const TWO_DOT_SEVENT_DOT_TWO: &str = "2.7.2"; diff --git a/k8s/upgrade/src/bin/upgrade-job/helm/values.rs b/k8s/upgrade/src/bin/upgrade-job/helm/values.rs index eb89f83ae..0bd3ce731 100644 --- a/k8s/upgrade/src/bin/upgrade-job/helm/values.rs +++ b/k8s/upgrade/src/bin/upgrade-job/helm/values.rs @@ -2,7 +2,7 @@ use crate::{ common::{ constants::{ KUBE_API_PAGE_SIZE, TWO_DOT_FIVE, TWO_DOT_FOUR, TWO_DOT_ONE, TWO_DOT_O_RC_ONE, - TWO_DOT_SIX, TWO_DOT_THREE, + TWO_DOT_SEVENT_DOT_TWO, TWO_DOT_SIX, TWO_DOT_THREE, }, error::{ DeserializePromtailExtraConfig, ListCrds, Result, SemverParse, @@ -372,6 +372,17 @@ where )?; } + // Special-case values for 2.7.2. + let two_dot_seven_dot_two = Version::parse(TWO_DOT_SEVENT_DOT_TWO).context(SemverParse { + version_string: TWO_DOT_SEVENT_DOT_TWO.to_string(), + })?; + if source_version.ge(&two_dot_o_rc_zero) && source_version.lt(&two_dot_seven_dot_two) { + yq.delete_object( + YamlKey::try_from(".localpv-provisioner.release")?, + upgrade_values_file.path(), + )?; + } + // Default options. // Image tag is set because the high_priority file is the user's source options file. // The target's image tag needs to be set for PRODUCT upgrade.