Skip to content

Commit d2a2a5e

Browse files
author
datacore-bolt-ci
committed
ci(stability): merge the release/2.9 branch
2 parents 1ac7b77 + 8bf8eb4 commit d2a2a5e

File tree

8 files changed

+80
-9
lines changed

8 files changed

+80
-9
lines changed

chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ dependencies:
5454
condition: localpv-provisioner.enabled
5555
annotations:
5656
helm.sh/images: |
57-
- name: etcd
58-
image: docker.io/bitnami/etcd:3.5.6-debian-11-r10
5957
- name: alloy
6058
image: docker.io/grafana/alloy:v1.8.1
6159
- name: loki
@@ -64,6 +62,8 @@ annotations:
6462
image: docker.io/openebs/alpine-bash:4.2.0
6563
- name: alpine-sh
6664
image: docker.io/openebs/alpine-sh:4.2.0
65+
- name: etcd
66+
image: docker.io/openebs/etcd:3.5.6-debian-11-r10
6767
- name: mayastor-agent-core
6868
image: docker.io/openebs/mayastor-agent-core:release-2.9
6969
- name: mayastor-agent-ha-cluster

chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ This removes all the Kubernetes components associated with the chart and deletes
6666

6767
| Key | Description | Default |
6868
|:----|:------------|:--------|
69+
| agents.​core.​allowNonPersistentDevlink | Allow using non-persistent kernel devpaths for pool disks. Enabling this will let users to use the kernel devpaths e.g /dev/sda, for diskpools. However, this comes with associated risks if the devpaths get swapped among disks, resulting in total data loss especially if encryption is being used. | `false` |
6970
| agents.​core.​capacity.​thin.​poolCommitment | The allowed pool commitment limit when dealing with thin provisioned volumes. Example: If the commitment is 250 and the pool is 10GiB we can overcommit the pool up to 25GiB (create 2 10GiB and 1 5GiB volume) but no further. | `"250%"` |
7071
| agents.​core.​capacity.​thin.​snapshotCommitment | When creating snapshots for an existing volume, each replica pool must have at least this much free space percentage of the volume size. Example: if this value is 40, the pool has 40GiB free, then the max volume size allowed to be snapped on the pool is 100GiB. | `"40%"` |
7172
| agents.​core.​capacity.​thin.​volumeCommitment | When creating replicas for an existing volume, each replica pool must have at least this much free space percentage of the volume size. Example: if this value is 40, the pool has 40GiB free, then the max volume size allowed to be created on the pool is 100GiB. | `"40%"` |

chart/images.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
docker.io/bitnami/etcd:3.5.6-debian-11-r10
21
docker.io/grafana/alloy:v1.8.1
32
docker.io/grafana/loki:3.4.2
43
docker.io/openebs/alpine-bash:4.2.0
54
docker.io/openebs/alpine-sh:4.2.0
5+
docker.io/openebs/etcd:3.5.6-debian-11-r10
66
docker.io/openebs/mayastor-agent-core:release-2.9
77
docker.io/openebs/mayastor-agent-ha-cluster:release-2.9
88
docker.io/openebs/mayastor-agent-ha-node:release-2.9

chart/templates/mayastor/agents/core/agent-core-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ spec:
7474
- "--no-volume-health"{{ end }}
7575
{{- if eq .Values.agents.core.encryptedPoolsSoftScheduling true }}
7676
- "--encrypted-pools-soft-scheduling"{{- end }}
77+
{{- if eq .Values.agents.core.allowNonPersistentDevlink true}}
78+
- "--allow-non-persistent-devlink"{{- end }}
7779
ports:
7880
- containerPort: 50051
7981
env:

chart/values.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ agents:
209209
# If a volume wasn't provisioned with a encryption storageclass, we try to place the replicas of such volume on best-effort basis onto encrypted pools, if this global is set.
210210
# This is effective subject to volume spec already modified via plugin to request encryption.
211211
encryptedPoolsSoftScheduling: false
212+
# -- Allow using non-persistent kernel devpaths for pool disks.
213+
# Enabling this will let users to use the kernel devpaths e.g /dev/sda, for diskpools. However, this comes with associated risks if the devpaths
214+
# get swapped among disks, resulting in total data loss especially if encryption is being used.
215+
allowNonPersistentDevlink: false
212216
ha:
213217
enabled: true
214218
node:
@@ -549,8 +553,11 @@ etcd:
549553
repository: openebs/alpine-bash
550554
tag: 4.2.0
551555
pullSecrets: []
552-
# extra debug information on logs
553-
debug: false
556+
image:
557+
registry: docker.io
558+
repository: openebs/etcd
559+
# extra debug information on logs
560+
debug: false
554561
# -- Pod anti-affinity preset
555562
# Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
556563
podAntiAffinityPreset: "hard"

k8s/upgrade/src/common/constants.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ pub(crate) const TWO_DOT_EIGHT: Version = Version::new(2, 8, 0);
6666

6767
/// Version value for 2.9.0.
6868
pub(crate) const TWO_DOT_NINE: Version = Version::new(2, 9, 0);
69+
70+
/// Version value for 2.9.2.
71+
pub(crate) const TWO_DOT_NINE_DOT_TWO: Version = Version::new(2, 9, 2);

k8s/upgrade/src/helm/chart.rs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ pub(crate) struct CoreValues {
9696
agents: Agents,
9797
/// This contains values for all the base components.
9898
base: Base,
99+
/// This contains values for all of the Etcd components,
100+
etcd: Etcd,
99101
/// This is the yaml object which contains values for the container image registry, repository,
100102
/// tag, etc.
101103
image: Image,
@@ -366,6 +368,36 @@ impl CoreValues {
366368
pub(crate) fn jaeger_operator_image_tag(&self) -> &str {
367369
self.jaeger_operator.image_tag()
368370
}
371+
372+
/// Returns the value of .etcd.debug (as seen on etcd chart v8.6.0).
373+
pub(crate) fn etcd_deprecated_debug_logs(&self) -> Option<bool> {
374+
self.etcd.deprecated_debug_logs()
375+
}
376+
377+
/// Returns the image repository of the etcd container.
378+
pub(crate) fn etcd_image_repo(&self) -> &str {
379+
self.etcd.image_repository()
380+
}
381+
}
382+
383+
/// This is used to deserialize the yaml object etcd.
384+
#[derive(Deserialize)]
385+
#[serde(rename_all(deserialize = "camelCase"))]
386+
struct Etcd {
387+
image: GenericImage,
388+
#[serde(rename(deserialize = "debug"))]
389+
deprecated_debug: Option<bool>,
390+
}
391+
392+
impl Etcd {
393+
/// Returns the value of .etcd.autoCompactionRetention.
394+
fn deprecated_debug_logs(&self) -> Option<bool> {
395+
self.deprecated_debug
396+
}
397+
398+
fn image_repository(&self) -> &str {
399+
self.image.repository()
400+
}
369401
}
370402

371403
/// This is used to deserialize the yaml object agents.
@@ -1258,13 +1290,19 @@ impl LocalpvProvisionerLocalpv {
12581290
struct GenericImage {
12591291
#[serde(default)]
12601292
tag: String,
1293+
#[serde(default)]
1294+
repository: String,
12611295
}
12621296

12631297
impl GenericImage {
1264-
/// This is getter for the various container image tags in the localpv-provisioner helm chart.
1298+
/// This is getter for various container image tags.
12651299
fn tag(&self) -> &str {
12661300
self.tag.as_str()
12671301
}
1302+
/// This is a getter for the various container image repositories.
1303+
fn repository(&self) -> &str {
1304+
self.repository.as_str()
1305+
}
12681306
}
12691307

12701308
/// This is used to deserialize the 'helperPod' yaml object in the localpv-provisioner helm chart.

k8s/upgrade/src/helm/values.rs

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use crate::{
22
common::{
33
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,
67
},
78
error::{
89
DeserializePromtailExtraConfig, Result, SemverParse, SerializeBaseInitContainersToJson,
@@ -586,6 +587,21 @@ where
586587
}
587588
}
588589

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+
589605
// Default options.
590606
// Image tag is set because the high_priority file is the user's source options file.
591607
// The target's image tag needs to be set for PRODUCT upgrade.
@@ -636,7 +652,11 @@ where
636652
target_values.localpv_helper_image_tag(),
637653
upgrade_values_file.path(),
638654
)?;
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+
)?;
640660
// Disable CRD installation in case they already exist using helm values.
641661
safe_crd_install(upgrade_values_file.path(), &yq).await?;
642662

0 commit comments

Comments
 (0)