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
1 change: 1 addition & 0 deletions crates/pipeline-manager/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ mod test {
https_tls_key_path: None,
private_ca_cert_path: None,
pipeline_monitor_events_retention: 720,
disable_cluster_monitor_resources: false,
};

let manager_config = ApiServerConfig {
Expand Down
29 changes: 12 additions & 17 deletions crates/pipeline-manager/src/cluster_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::db::storage::Storage;
use crate::db::storage_postgres::StoragePostgres;
use crate::db::types::monitor::{MonitorStatus, NewClusterMonitorEvent};
use crate::error::source_error;
use crate::unstable_features;
use async_trait::async_trait;
use feldera_observability::ReqwestTracingExt;
use std::{sync::Arc, time::Duration};
Expand Down Expand Up @@ -39,10 +38,8 @@ const RESOURCES_INFO_NOT_AVAILABLE: &str =
"Resources information not available in Community edition.";

/// Message when the resources information gathering is not enabled.
const RESOURCES_INFO_NOT_ENABLED: &str = "Resources information is not enabled. \
Cluster monitoring resources is currently an unstable feature. It can be enabled by \
setting the control plane environment variable FELDERA_UNSTABLE_FEATURES and adding to it \
`cluster_monitor_resources` as one of the comma-separated entries.";
const RESOURCES_INFO_DISABLED: &str =
"Cluster monitoring resources information is disabled in the configuration.";

/// Target to poll resources of.
pub enum PollResourcesTarget {
Expand Down Expand Up @@ -128,9 +125,16 @@ pub async fn cluster_monitor<P: ResourcesPoller>(
api_resources_info,
compiler_resources_info,
runner_resources_info,
) = if unstable_features().is_some_and(|activated_unstable_features| {
activated_unstable_features.contains("cluster_monitor_resources")
}) {
) = if common_config.disable_cluster_monitor_resources {
(
true,
true,
true,
RESOURCES_INFO_DISABLED.to_string(),
RESOURCES_INFO_DISABLED.to_string(),
RESOURCES_INFO_DISABLED.to_string(),
)
} else {
let (api_resources_ok, api_resources_info) = resources_poller
.poll_resources(PollResourcesTarget::Api)
.await;
Expand All @@ -148,15 +152,6 @@ pub async fn cluster_monitor<P: ResourcesPoller>(
truncate_info(compiler_resources_info),
truncate_info(runner_resources_info),
)
} else {
(
true,
true,
true,
RESOURCES_INFO_NOT_ENABLED.to_string(),
RESOURCES_INFO_NOT_ENABLED.to_string(),
RESOURCES_INFO_NOT_ENABLED.to_string(),
)
};

// Whether to insert the event into the database
Expand Down
1 change: 1 addition & 0 deletions crates/pipeline-manager/src/compiler/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ impl CompilerTest {
https_tls_key_path: None,
private_ca_cert_path: None,
pipeline_monitor_events_retention: 720,
disable_cluster_monitor_resources: false,
};
let compiler_config = CompilerConfig {
sql_compiler_path:
Expand Down
11 changes: 9 additions & 2 deletions crates/pipeline-manager/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ pub struct CommonConfig {
/// Currently supported features:
/// - `runtime_version`: Allows to override the runtime version of a pipeline on the platform.
/// - `testing`
/// - `cluster_monitor_resources`: Cluster monitoring also monitors the resources backing the
/// instance (i.e., the Kubernetes objects).
/// - `rust_compiler_full_cleanup`: the Rust compiler fully cleans up the target directory if the
/// disk space usage is approaching its limit.
#[arg(verbatim_doc_comment, long, env = "FELDERA_UNSTABLE_FEATURES")]
Expand Down Expand Up @@ -316,6 +314,14 @@ pub struct CommonConfig {
/// Number of monitor events that are retained for each pipeline.
#[arg(long, default_value_t = default_pipeline_monitor_events_retention(), env = "FELDERA_PIPELINE_MONITOR_EVENTS_RETENTION")]
pub pipeline_monitor_events_retention: u32,

/// Whether to disable cluster monitoring of its own (Kubernetes) resources.
#[arg(
long,
default_value_t = false,
env = "FELDERA_DISABLE_CLUSTER_MONITOR_RESOURCES"
)]
pub disable_cluster_monitor_resources: bool,
}

impl CommonConfig {
Expand Down Expand Up @@ -588,6 +594,7 @@ impl CommonConfig {
https_tls_key_path: None,
private_ca_cert_path: None,
pipeline_monitor_events_retention: 720,
disable_cluster_monitor_resources: false,
}
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/pipeline-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub fn platform_enable_unstable(requested_features: &str) {
let all_features: HashSet<&'static str> = HashSet::from_iter(vec![
"runtime_version",
"testing",
"cluster_monitor_resources",
"rust_compiler_full_cleanup",
]);
let mut enabled = HashSet::new();
Expand Down
1 change: 1 addition & 0 deletions crates/pipeline-manager/src/runner/pipeline_automata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,7 @@ mod test {
https_tls_key_path: None,
private_ca_cert_path: None,
pipeline_monitor_events_retention: 720,
disable_cluster_monitor_resources: false,
},
pipeline_id,
Some("test-pipeline".to_string()),
Expand Down
8 changes: 8 additions & 0 deletions docs.feldera.com/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ import TabItem from '@theme/TabItem';

## Unreleased

- Cluster monitor events with information on the backing (Kubernetes) resources is
no longer gated behind unstable feature `cluster_monitor_resources` (deprecated).
It is now enabled by default. This change adds RBAC permissions to get the
deployments of the API server and the runner. The status of the backing Kubernetes
resources is shown in the Feldera Health page to every (authenticated) user.
The cluster monitoring of resources can still be disabled by setting in the Helm
chart `disableClusterMonitorResources` to `true`.

- A bug fix introduced a backward incompatible change to the replay journal format.
This only affects pipelines configured with exactly-once fault tolerance. Such
pipelines should not be upgraded to the new Feldera runtime if they are in a failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ Configure HTTPS for all Feldera components. See the [HTTPS guide](./https) for c

| Key | Default | Description |
|-----|---------|-------------|
| `unstableFeatures` | `[]` | List of unstable feature flags to enable. Possible values: `"testing"`, `"runtime_version"`, `"cluster_monitor_resources"`. Do not also set `FELDERA_UNSTABLE_FEATURES` in `controlPlane.env`. |
| `unstableFeatures` | `[]` | List of unstable feature flags to enable. Possible values: `"testing"`, `"runtime_version"`, `"rust_compiler_full_cleanup"`. Do not also set `FELDERA_UNSTABLE_FEATURES` in `controlPlane.env`. |
| `felderaSentryEnabled` | `false` | Send crash reports and logs to Feldera's Sentry installation. |
| `cloudApiEndpoint` | `"https://cloud1.feldera.com"` | Feldera cloud API endpoint used for license verification and runner telemetry. |
| `disableClusterMonitorResources` | `false` | Whether to disable cluster monitoring of its own (Kubernetes) resources. |
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ notably at most 1000 and with a time limit of 72 hours (whichever comes first).
With this, it is possible to access both the latest health check of the cluster
and its health in the recent past. The events are accessible through the API.

The resources monitoring feature is not yet stabilized, but can already be activated by adding
`cluster_monitor_resources` to the Helm chart `unstableFeatures` array value.
The resources monitoring feature can be deactivated by setting
in the Helm chart `disableClusterMonitorResources` to `true`.

## API usage

Expand Down
Loading