|
1 | 1 | use crate::{ |
2 | 2 | common::{ |
3 | 3 | constants::{ |
4 | | - TWO_DOT_EIGHT, TWO_DOT_FIVE, TWO_DOT_FOUR, TWO_DOT_ONE, TWO_DOT_O_RC_ONE, |
5 | | - TWO_DOT_SEVEN_DOT_THREE, TWO_DOT_SEVEN_DOT_TWO, TWO_DOT_SIX, TWO_DOT_THREE, |
| 4 | + TWO_DOT_EIGHT, TWO_DOT_FIVE, TWO_DOT_FOUR, TWO_DOT_NINE_DOT_TWO, TWO_DOT_ONE, |
| 5 | + TWO_DOT_O_RC_ONE, TWO_DOT_SEVEN_DOT_THREE, TWO_DOT_SEVEN_DOT_TWO, TWO_DOT_SIX, |
| 6 | + TWO_DOT_THREE, |
6 | 7 | }, |
7 | 8 | error::{ |
8 | 9 | DeserializePromtailExtraConfig, Result, SemverParse, SerializeBaseInitContainersToJson, |
@@ -586,6 +587,21 @@ where |
586 | 587 | } |
587 | 588 | } |
588 | 589 |
|
| 590 | + // Special-case values for 2.9.2. |
| 591 | + if source_version.ge(&two_dot_o_rc_one) && source_version.lt(&TWO_DOT_NINE_DOT_TWO) { |
| 592 | + if let Some(debug_logs) = source_values.etcd_deprecated_debug_logs() { |
| 593 | + yq.delete_object( |
| 594 | + YamlKey::try_from(".etcd.debug")?, |
| 595 | + upgrade_values_file.path(), |
| 596 | + )?; |
| 597 | + yq.set_literal_value( |
| 598 | + YamlKey::try_from(".etcd.image.debug")?, |
| 599 | + debug_logs, |
| 600 | + upgrade_values_file.path(), |
| 601 | + )?; |
| 602 | + } |
| 603 | + } |
| 604 | + |
589 | 605 | // Default options. |
590 | 606 | // Image tag is set because the high_priority file is the user's source options file. |
591 | 607 | // The target's image tag needs to be set for PRODUCT upgrade. |
@@ -636,7 +652,11 @@ where |
636 | 652 | target_values.localpv_helper_image_tag(), |
637 | 653 | upgrade_values_file.path(), |
638 | 654 | )?; |
639 | | - |
| 655 | + yq.set_literal_value( |
| 656 | + YamlKey::try_from(".etcd.image.repository")?, |
| 657 | + target_values.etcd_image_repo(), |
| 658 | + upgrade_values_file.path(), |
| 659 | + )?; |
640 | 660 | // Disable CRD installation in case they already exist using helm values. |
641 | 661 | safe_crd_install(upgrade_values_file.path(), &yq).await?; |
642 | 662 |
|
|
0 commit comments