Skip to content

Commit

Permalink
chore(bors): merge pull request #475
Browse files Browse the repository at this point in the history
475: Cherry-pick PR #474 r=tiagolobocastro a=niladrih

This PR cherry-picks the commits from PR 474 to release/2.6 branch

Co-authored-by: Niladri Halder <[email protected]>
  • Loading branch information
mayastor-bors and niladrih committed Apr 10, 2024
2 parents f62faa6 + 5b5478b commit 5e07ae2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions k8s/upgrade/src/bin/upgrade-job/helm/chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ pub(crate) struct CoreValues {
eventing: Eventing,
/// This contains Kubernetes CSI sidecar container image details.
csi: Csi,
/// The contains the values for the jaegertracing/jaeger-operator chart.
#[serde(rename(deserialize = "jaeger-operator"))]
jaeger_operator: JaegerOperator,
/// This contains loki-stack details.
#[serde(rename(deserialize = "loki-stack"))]
loki_stack: LokiStack,
Expand Down Expand Up @@ -290,6 +293,10 @@ impl CoreValues {
pub(crate) fn deprecated_log_silence_level(&self) -> &str {
self.base.deprecated_log_silence_level()
}

pub(crate) fn jaeger_operator_image_tag(&self) -> &str {
self.jaeger_operator.image_tag()
}
}

/// This is used to deserialize the yaml object agents.
Expand Down Expand Up @@ -1043,3 +1050,16 @@ impl LocalpvProvisionerHelperPod {
self.image.tag()
}
}

/// This is used to deserialize the '.jaeger-operator' yaml object.
#[derive(Deserialize)]
struct JaegerOperator {
image: GenericImage,
}

impl JaegerOperator {
/// This returns the image tag of the jaeger-operator from the jaeger-operator helm chart.
fn image_tag(&self) -> &str {
self.image.tag()
}
}
8 changes: 8 additions & 0 deletions k8s/upgrade/src/bin/upgrade-job/helm/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,14 @@ where
YamlKey::try_from(".csi.node.pluginMounthPath")?,
upgrade_values_file.path(),
)?;

// This sets the image tag for the jaeger-operator. This is required for the
// jaeger-operator dependency update from 2.50.0 to 2.50.1.
yq.set_literal_value(
YamlKey::try_from(".jaeger-operator.image.tag")?,
source_values.jaeger_operator_image_tag(),
upgrade_values_file.path(),
)?;
}

// Default options.
Expand Down

0 comments on commit 5e07ae2

Please sign in to comment.