Skip to content
Draft
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Add `/ready` endpoint to the operator Deployment, which reports the CRD installation status ([#868]).
- Webservers now have a default affinity to the OPA Pods when OPA authorization is configured ([#872]).
- The logs of the `containerdebug` process are now collected by the Vector agent and forwarded to
the Vector aggregator ([#888]).
the Vector aggregator ([#888], [#892]).

### Changed

Expand Down Expand Up @@ -112,6 +112,7 @@
[#886]: https://github.com/stackabletech/airflow-operator/pull/886
[#887]: https://github.com/stackabletech/airflow-operator/pull/887
[#888]: https://github.com/stackabletech/airflow-operator/pull/888
[#892]: https://github.com/stackabletech/airflow-operator/pull/892

## [26.7.0] - 2026-07-21

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{collections::BTreeSet, str::FromStr};

use const_format::concatcp;
use stackable_operator::{
constant,
crd::{authentication::oidc, git_sync},
Expand Down Expand Up @@ -188,9 +189,11 @@ pub fn build_airflow_statefulset_envs(
// other telemetry-based process in it would log into the same directory and the Vector
// agent would label its events with `container: containerdebug`.
env_vars = env_vars
// The directory must be exactly one level below the log directory, because the Vector
// agent derives the container name from that path segment.
.with_value(
&FILE_LOG_DIRECTORY,
format!("{STACKABLE_LOG_DIR}/containerdebug"),
concatcp!(STACKABLE_LOG_DIR, "/containerdebug"),
)
.with_value(&FILE_LOG_ROTATION_PERIOD, "hourly")
.with_value(&FILE_LOG_MAX_FILES, "2")
Expand Down
8 changes: 3 additions & 5 deletions rust/operator-binary/src/controller/build/volumes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ pub fn create_volumes(
name: LOG_VOLUME_NAME.to_string(),
empty_dir: Some(EmptyDirVolumeSource {
medium: None,
// Only the Airflow log files are budgeted here. The `containerdebug` files in this
// volume are rotated by time, which bounds their number but not their size, so they
// are an unbudgeted writer. They stay negligible at the default INFO level and a 30
// minute loop, but raising `FILE_LOG_LEVEL` via `envOverrides` can exceed the limit,
// which makes the kubelet evict the Pod.
// Only the Airflow log files are budgeted. The `containerdebug` files in this
// volume are rotated by time, not by size, so they have no budget; raising
// `FILE_LOG_LEVEL` via `envOverrides` can therefore evict the Pod.
size_limit: Some(product_logging::framework::calculate_log_volume_size_limit(
&[MAX_LOG_FILES_SIZE],
)),
Expand Down
8 changes: 7 additions & 1 deletion rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,13 @@ impl Deref for AirflowRole {
}

fn container_debug_command() -> String {
format!("containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &")
// The log directory is created here, because `FILE_LOG_MAX_FILES` makes the telemetry library
// prune old log files before it creates the first one, which complains about the directory not
// existing yet.
format!(
"mkdir --parents \"$FILE_LOG_DIRECTORY\"\n\
containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"
)
}

#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
Expand Down
Loading