Skip to content

Commit

Permalink
Rename runtime filters to config (#1685)
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 authored May 23, 2024
1 parent 5f64637 commit 062f18c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions collector/lib/CollectorConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ BoolEnvVar enable_connection_stats("ROX_COLLECTOR_ENABLE_CONNECTION_STATS", true

BoolEnvVar enable_detailed_metrics("ROX_COLLECTOR_ENABLE_DETAILED_METRICS", true);

BoolEnvVar enable_runtime_filters("ROX_COLLECTOR_RUNTIME_FILTERS_ENABLED", false);
BoolEnvVar enable_runtime_config("ROX_COLLECTOR_RUNTIME_CONFIG_ENABLED", false);

BoolEnvVar use_docker_ce("ROX_COLLECTOR_CE_USE_DOCKER", false);
BoolEnvVar use_podman_ce("ROX_COLLECTOR_CE_USE_PODMAN", false);
Expand Down Expand Up @@ -80,7 +80,7 @@ void CollectorConfig::InitCollectorConfig(CollectorArgs* args) {
enable_external_ips_ = enable_external_ips.value();
enable_connection_stats_ = enable_connection_stats.value();
enable_detailed_metrics_ = enable_detailed_metrics.value();
enable_runtime_filters_ = enable_runtime_filters.value();
enable_runtime_config_ = enable_runtime_config.value();
use_docker_ce_ = use_docker_ce.value();
use_podman_ce_ = use_podman_ce.value();
enable_introspection_ = enable_introspection.value();
Expand Down
4 changes: 2 additions & 2 deletions collector/lib/CollectorConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class CollectorConfig {
bool EnableExternalIPs() const { return enable_external_ips_; }
bool EnableConnectionStats() const { return enable_connection_stats_; }
bool EnableDetailedMetrics() const { return enable_detailed_metrics_; }
bool EnableRuntimeFilters() const { return enable_runtime_filters_; }
bool EnableRuntimeConfig() const { return enable_runtime_config_; }
bool UseDockerCe() const { return use_docker_ce_; }
bool UsePodmanCe() const { return use_podman_ce_; }
bool IsIntrospectionEnabled() const { return enable_introspection_; }
Expand Down Expand Up @@ -112,7 +112,7 @@ class CollectorConfig {
bool enable_external_ips_;
bool enable_connection_stats_;
bool enable_detailed_metrics_;
bool enable_runtime_filters_;
bool enable_runtime_config_;
bool use_docker_ce_;
bool use_podman_ce_;
bool enable_introspection_;
Expand Down
2 changes: 1 addition & 1 deletion collector/lib/system-inspector/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ bool Service::InitKernel(const CollectorConfig& config, const DriverCandidate& c

container_metadata_inspector_.reset(new ContainerMetadata(inspector_.get()));

if (config.EnableRuntimeFilters()) {
if (config.EnableRuntimeConfig()) {
uint64_t mask = 1 << CT_CRI |
1 << CT_CRIO |
1 << CT_CONTAINERD;
Expand Down
6 changes: 3 additions & 3 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ $ curl collector:8080/state/containers/01e8c0454972
In order for the metadata to be collected, the collector daemonset needs to be
edited for it to have access to the corresponding CRI socket on the system.
Since metadata collection is locked behind a feature flag, the
`ROX_COLLECTOR_RUNTIME_FILTERS_ENABLED` needs to be set to `true` as well.
`ROX_COLLECTOR_RUNTIME_CONFIG_ENABLED` needs to be set to `true` as well.

```yaml
spec:
Expand All @@ -520,7 +520,7 @@ spec:
containers:
...
env:
- name: ROX_COLLECTOR_RUNTIME_FILTERS_ENABLED
- name: ROX_COLLECTOR_RUNTIME_CONFIG_ENABLED
value: "true"
...
volumeMounts:
Expand Down Expand Up @@ -585,7 +585,7 @@ Example of connection query, limited to container with identifier `c6f030bc4b42`
```
$ curl "http://<collector>:8080/state/network/connection?container=c6f030bc4b42"
{
"c6f030bc4b42" :
"c6f030bc4b42" :
[
{
"active" : true,
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/suites/k8s_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (k *K8sNamespaceTestSuite) SetupSuite() {

err := k.Collector().Setup(&collector.StartupOptions{
Env: map[string]string{
"ROX_COLLECTOR_RUNTIME_FILTERS_ENABLED": "true",
"ROX_COLLECTOR_INTROSPECTION_ENABLE": "true",
"ROX_COLLECTOR_RUNTIME_CONFIG_ENABLED": "true",
"ROX_COLLECTOR_INTROSPECTION_ENABLE": "true",
},
})
k.Require().NoError(err)
Expand Down

0 comments on commit 062f18c

Please sign in to comment.