Skip to content
Merged
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ All notable changes to this project will be documented in this file.

### Changed

- Bump stackable-operator to 0.106.2, and strum to 0.28 ([#760]).
- Bump stackable-operator to 0.108.0, and strum to 0.28 ([#760], [#764]).
- Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#747]).
- Added warning and exit condition to format-namenodes container script to check for corrupted data after formatting ([#751]).

### Fixed

- Fix "404 page not found" error for the initial object list ([#764]).
- Previously, some shell output of init-containers was not logged properly and therefore not aggregated, which is fixed now ([#746]).

[#738]: https://github.com/stackabletech/hdfs-operator/pull/738
Expand All @@ -28,6 +29,7 @@ All notable changes to this project will be documented in this file.
[#751]: https://github.com/stackabletech/hdfs-operator/pull/751
[#753]: https://github.com/stackabletech/hdfs-operator/pull/753
[#760]: https://github.com/stackabletech/hdfs-operator/pull/760
[#764]: https://github.com/stackabletech/hdfs-operator/pull/764

## [25.11.0] - 2025-11-07

Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 18 additions & 19 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/hdfs-operator"

[workspace.dependencies]
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.106.2", features = ["telemetry", "versioned", "webhook"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = ["crds", "webhook"] }

anyhow = "1.0"
built = { version = "0.8", features = ["chrono", "git2"] }
Expand Down
18 changes: 9 additions & 9 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions deploy/helm/hdfs-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ rules:
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
- create
- patch
# Required for startup condition
- list
- watch
{{- end }}
- apiGroups:
- events.k8s.io
Expand Down
12 changes: 5 additions & 7 deletions rust/operator-binary/src/crd/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,23 @@ fn default_number_of_datanode_pvcs() -> Option<u16> {
Some(1)
}

#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "PascalCase")]
pub enum HdfsStorageType {
Archive,

#[default]
Disk,

#[serde(rename = "SSD")]
Ssd,

#[serde(rename = "RAMDisk")]
RamDisk,
}

impl Atomic for HdfsStorageType {}

impl Default for HdfsStorageType {
fn default() -> Self {
Self::Disk
}
}

impl HdfsStorageType {
pub fn as_hdfs_config_literal(&self) -> &str {
match self {
Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn build_invalid_replica_message(
Some(format!(
"{role_name}: only has {replicas} replicas configured, it is strongly recommended to use at least [{min_replicas}]"
))
} else if !role.replicas_can_be_even() && replicas % 2 == 0 {
} else if !role.replicas_can_be_even() && replicas.is_multiple_of(2) {
Some(format!(
"{role_name}: currently has an even number of replicas [{replicas}], but should always have an odd number to ensure quorum"
))
Expand Down
16 changes: 13 additions & 3 deletions rust/operator-binary/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use stackable_operator::{
core::v1::{ConfigMap, Service},
},
kube::{
Api, ResourceExt,
Api, CustomResourceExt, ResourceExt,
api::PartialObjectMeta,
core::DeserializeGuard,
runtime::{
Expand All @@ -31,7 +31,7 @@ use stackable_operator::{
logging::controller::report_controller_reconciled,
shared::yaml::SerializeOptions,
telemetry::Tracing,
utils::signal::SignalWatcher,
utils::signal::{self, SignalWatcher},
};
use tracing::info_span;
use tracing_futures::Instrument;
Expand Down Expand Up @@ -215,8 +215,18 @@ async fn main() -> anyhow::Result<()> {
.instrument(info_span!("hdfs_controller"))
.map(anyhow::Ok);

let delayed_hdfs_controller = async {
signal::crd_established(&client, v1alpha1::HdfsCluster::crd_name(), None).await?;
hdfs_controller.await
};

// kube-runtime's Controller will tokio::spawn each reconciliation, so this only concerns the internal watch machinery
futures::try_join!(hdfs_controller, reflector, eos_checker, webhook_server)?;
futures::try_join!(
delayed_hdfs_controller,
webhook_server,
eos_checker,
reflector,
)?;
}
};

Expand Down