Skip to content

Commit

Permalink
chore(bors): merge pull request #473 #474
Browse files Browse the repository at this point in the history
473: fix(jaeger): update and use the jaeger bundled CRD r=tiagolobocastro a=tiagolobocastro

It seems otherwise there's a race condition in which CRD gets installed depending on the helm version.
We don't actually need to use our own CRD for jaeger anymore, so let's instead if the bundled one from jaeger-operator.
Updates jaeger-operator.
Note that as of now cert-manager is a required dependency for jaeger.

<!

474: feat(upgrade-job): add helm value set for jaeger-operator update r=tiagolobocastro a=niladrih

Requires PR 473

![Screenshot 2024-04-09 at 11 00 09 AM](https://github.com/openebs/mayastor-extensions/assets/55788661/ed31ccb1-156a-4e35-ac60-3039556e2afc)


Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
Co-authored-by: Niladri Halder <niladri.halder26@gmail.com>
  • Loading branch information
3 people committed Apr 9, 2024
3 parents 3604570 + 1f409fa + ddbb973 commit 4de82b3
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 75 deletions.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
version: 8.6.0
- name: jaeger-operator
version: 2.25.0
version: 2.50.1
repository: https://jaegertracing.github.io/helm-charts
condition: base.jaeger.enabled
- name: loki-stack
Expand Down
4 changes: 1 addition & 3 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This removes all the Kubernetes components associated with the chart and deletes
| | crds | 0.0.0 |
| https://charts.bitnami.com/bitnami | etcd | 8.6.0 |
| https://grafana.github.io/helm-charts | loki-stack | 2.9.11 |
| https://jaegertracing.github.io/helm-charts | jaeger-operator | 2.25.0 |
| 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.0.0 |

Expand Down Expand Up @@ -101,14 +101,12 @@ This removes all the Kubernetes components associated with the chart and deletes
| base.&ZeroWidthSpace;cache_poll_period | Cache timeout for core agent & diskpool deployment | `"30s"` |
| base.&ZeroWidthSpace;default_req_timeout | Request timeout for rest & core agents | `"5s"` |
| base.&ZeroWidthSpace;imagePullSecrets.&ZeroWidthSpace;enabled | Enable imagePullSecrets for pulling our container images | `false` |
| base.&ZeroWidthSpace;jaeger.&ZeroWidthSpace;enabled | Enable jaeger tracing | `false` |
| base.&ZeroWidthSpace;logging.&ZeroWidthSpace;color | Enable ansi color code for Pod StdOut/StdErr | `true` |
| base.&ZeroWidthSpace;logging.&ZeroWidthSpace;format | Valid values for format are pretty, json and compact | `"pretty"` |
| base.&ZeroWidthSpace;logging.&ZeroWidthSpace;silenceLevel | Silence specific module components | `nil` |
| base.&ZeroWidthSpace;metrics.&ZeroWidthSpace;enabled | Enable the metrics exporter | `true` |
| crds.&ZeroWidthSpace;csi.&ZeroWidthSpace;volumeSnapshots.&ZeroWidthSpace;enabled | Install Volume Snapshot CRDs | `true` |
| crds.&ZeroWidthSpace;enabled | Disables the installation of all CRDs if set to false | `true` |
| crds.&ZeroWidthSpace;jaeger.&ZeroWidthSpace;enabled | Install Jaeger CRDs | `true` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;logLevel | Log level for the csi controller | `"info"` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;preventVolumeModeConversion | Prevent modifying the volume mode when creating a PVC from an existing VolumeSnapshot | `true` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;priorityClassName | Set PriorityClass, overrides global | `""` |
Expand Down
3 changes: 0 additions & 3 deletions chart/charts/crds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ A Helm chart that collects CustomResourceDefinitions (CRDs) from Mayastor.
| csi.&ZeroWidthSpace;volumeSnapshots.&ZeroWidthSpace;annotations | Annotations to be added to all CRDs | <pre>{<br><br>}</pre> |
| csi.&ZeroWidthSpace;volumeSnapshots.&ZeroWidthSpace;enabled | Install Volume Snapshot CRDs | `true` |
| csi.&ZeroWidthSpace;volumeSnapshots.&ZeroWidthSpace;keep | Keep CRDs on chart uninstall | `true` |
| jaeger.&ZeroWidthSpace;annotations | Annotations to be added to all CRDs | <pre>{<br><br>}</pre> |
| jaeger.&ZeroWidthSpace;enabled | Install Jaeger CRDs | `true` |
| jaeger.&ZeroWidthSpace;keep | Keep CRDs on chart uninstall | `true` |

50 changes: 0 additions & 50 deletions chart/charts/crds/templates/jaeger.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions chart/charts/crds/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
jaeger:
# -- Install Jaeger CRDs
enabled: true
# -- Keep CRDs on chart uninstall
keep: true
# -- Annotations to be added to all CRDs
annotations: {}
# Example for Argo CD to prevent CRDs from being recycled
# argocd.argoproj.io/sync-options: Prune=false

csi:
volumeSnapshots:
# -- Install Volume Snapshot CRDs
Expand All @@ -18,4 +8,3 @@ csi:
annotations: {}
# Example for Argo CD to prevent CRDs from being recycled
# argocd.argoproj.io/sync-options: Prune=false

10 changes: 3 additions & 7 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
crds:
# -- Disables the installation of all CRDs if set to false
enabled: true
jaeger:
# -- Install Jaeger CRDs
enabled: true
csi:
volumeSnapshots:
# -- Install Volume Snapshot CRDs
Expand Down Expand Up @@ -103,7 +100,9 @@ base:
enabled: true

jaeger:
# -- Enable jaeger tracing
# Enable jaeger tracing (for development only).
# Since version 1.31 the Jaeger Operator uses webhooks to validate Jaeger custom resources (CRs).
# This requires an installed version of the cert-manager.
enabled: false
initContainer: true
agent:
Expand Down Expand Up @@ -143,9 +142,6 @@ operators:
jaeger-operator:
# Name of jaeger operator
name: "{{ .Release.Name }}"
crd:
# Install jaeger CRDs
install: false
jaeger:
# Install jaeger-operator
create: false
Expand Down
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 4de82b3

Please sign in to comment.