Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(upgrade): remove etcd.initialClusterState from helm values #595

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions k8s/upgrade/src/common/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ pub(crate) const TWO_DOT_SIX: &str = "2.6.0";

/// Version value for 2.7.2 release.
pub(crate) const TWO_DOT_SEVEN_DOT_TWO: &str = "2.7.2";

/// Version value for 2.7.3.
pub(crate) const TWO_DOT_SEVEN_DOT_THREE: &str = "2.7.3";
13 changes: 12 additions & 1 deletion k8s/upgrade/src/helm/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_SEVEN_DOT_TWO, TWO_DOT_SIX, TWO_DOT_THREE,
TWO_DOT_SEVEN_DOT_THREE, TWO_DOT_SEVEN_DOT_TWO, TWO_DOT_SIX, TWO_DOT_THREE,
},
error::{
DeserializePromtailExtraConfig, ListCrds, Result, SemverParse,
Expand Down Expand Up @@ -383,6 +383,17 @@ where
)?;
}

// Special-case values for 2.7.3.
let two_dot_seven_dot_three = Version::parse(TWO_DOT_SEVEN_DOT_THREE).context(SemverParse {
version_string: TWO_DOT_SEVEN_DOT_THREE.to_string(),
})?;
if source_version.ge(&two_dot_o_rc_zero) && source_version.lt(&two_dot_seven_dot_three) {
yq.delete_object(
YamlKey::try_from(".etcd.initialClusterState")?,
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.
Expand Down
Loading