From 8cd4b09002de1f89f74a24cd39d891e61dd2234b Mon Sep 17 00:00:00 2001 From: Khushboo Sancheti Date: Mon, 5 Oct 2026 11:03:55 -0700 Subject: [PATCH] Rename feature flag and sensor capability to reflect Kind as the chosen terminology over Type Co-authored-by: Cursor --- pkg/centralsensor/caps_list.go | 6 +++--- pkg/features/list.go | 4 ++-- sensor/common/detector/detector.go | 4 ++-- tests/e2e/lib-compat.sh | 2 +- tests/e2e/lib.sh | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/centralsensor/caps_list.go b/pkg/centralsensor/caps_list.go index 2cbfbdf727d5a..e594c6fd237bf 100644 --- a/pkg/centralsensor/caps_list.go +++ b/pkg/centralsensor/caps_list.go @@ -110,8 +110,8 @@ const ( // a new Sensor" from "old Sensor that predates VM telemetry fields." VirtualMachineTelemetryCap SensorCapability = "VirtualMachineTelemetry" - // WorkloadTypeExclusionCap identifies the capability of Sensor to honor - // Exclusion.exclude_by_type rules. Central strips those rules when syncing + // WorkloadKindExclusionCap identifies the capability of Sensor to honor + // Exclusion.exclude_by_kind rules. Central strips those rules when syncing // policies to Sensors that lack this capability. - WorkloadTypeExclusionCap SensorCapability = "WorkloadTypeExclusion" + WorkloadKindExclusionCap SensorCapability = "WorkloadKindExclusion" ) diff --git a/pkg/features/list.go b/pkg/features/list.go index f650124fef654..d669ae5f48907 100644 --- a/pkg/features/list.go +++ b/pkg/features/list.go @@ -146,8 +146,8 @@ var ( // EvaluationFilter enables evaluation filtering in policy evaluation. EvaluationFilter = registerFeature("Enable evaluation filtering in policy evaluation", "ROX_EVALUATION_FILTER", enabled) - // PolicyWorkloadTypeExclusion enables excluding all workloads of selected Kubernetes kinds (Job, CronJob) from a policy. - PolicyWorkloadTypeExclusion = registerFeature("Enable excluding all workloads of a given type from a policy", "ROX_POLICY_WORKLOAD_TYPE_EXCLUSION") + // PolicyWorkloadKindExclusion enables excluding all workloads of selected Kubernetes kinds (Job, CronJob) from a policy. + PolicyWorkloadKindExclusion = registerFeature("Enable excluding all workloads of a given kind from a policy", "ROX_POLICY_WORKLOAD_KIND_EXCLUSION") // UISecretsPageMigration enables the secrets list page under the Risk section UISecretsPageMigration = registerFeature("Display secrets list page under Risk section", "ROX_UI_SECRETS_PAGE_MIGRATION") diff --git a/sensor/common/detector/detector.go b/sensor/common/detector/detector.go index 91a329abf3c20..5eae96f0afdc9 100644 --- a/sensor/common/detector/detector.go +++ b/sensor/common/detector/detector.go @@ -428,8 +428,8 @@ func (d *detectorImpl) Notify(e common.SensorComponentEvent) { func (d *detectorImpl) Capabilities() []centralsensor.SensorCapability { caps := []centralsensor.SensorCapability{centralsensor.SensorDetectionCap} - if features.PolicyWorkloadTypeExclusion.Enabled() { - caps = append(caps, centralsensor.WorkloadTypeExclusionCap) + if features.PolicyWorkloadKindExclusion.Enabled() { + caps = append(caps, centralsensor.WorkloadKindExclusionCap) } return caps } diff --git a/tests/e2e/lib-compat.sh b/tests/e2e/lib-compat.sh index 0a13226f860c5..68d429e6a5587 100644 --- a/tests/e2e/lib-compat.sh +++ b/tests/e2e/lib-compat.sh @@ -237,7 +237,7 @@ collect_feature_flags() { env_with_default ROX_NODE_VULNERABILITY_REPORTS "true" env_with_default ROX_TAILORED_PROFILES "true" env_with_default ROX_INIT_CONTAINER_SUPPORT "true" - env_with_default ROX_POLICY_WORKLOAD_TYPE_EXCLUSION "true" + env_with_default ROX_POLICY_WORKLOAD_KIND_EXCLUSION "true" env_with_default ROX_VIRTUAL_MACHINES_ENHANCED_DATA_MODEL "true" env_with_default ROX_LABEL_BASED_POLICY_SCOPING "true" env_with_default ROX_POLICY_CRITERIA_MODAL "true" diff --git a/tests/e2e/lib.sh b/tests/e2e/lib.sh index 8f3f484b202e8..62408104485a9 100755 --- a/tests/e2e/lib.sh +++ b/tests/e2e/lib.sh @@ -423,7 +423,7 @@ export_test_environment() { ci_export ROX_NETFLOW_BATCHING "${ROX_NETFLOW_BATCHING:-true}" ci_export ROX_NETFLOW_CACHE_LIMITING "${ROX_NETFLOW_CACHE_LIMITING:-true}" ci_export ROX_INIT_CONTAINER_SUPPORT "${ROX_INIT_CONTAINER_SUPPORT:-true}" - ci_export ROX_POLICY_WORKLOAD_TYPE_EXCLUSION "${ROX_POLICY_WORKLOAD_TYPE_EXCLUSION:-true}" + ci_export ROX_POLICY_WORKLOAD_KIND_EXCLUSION "${ROX_POLICY_WORKLOAD_KIND_EXCLUSION:-true}" ci_export ROX_VIRTUAL_MACHINES_ENHANCED_DATA_MODEL "${ROX_VIRTUAL_MACHINES_ENHANCED_DATA_MODEL:-true}" ci_export ROX_UI_SECRETS_PAGE_MIGRATION "${ROX_UI_SECRETS_PAGE_MIGRATION:-true}" ci_export ROX_AI_INTEGRATIONS "${ROX_AI_INTEGRATIONS:-true}" @@ -604,7 +604,7 @@ deploy_central_via_operator() { customize_envVars+=$'\n value: "true"' customize_envVars+=$'\n - name: ROX_INIT_CONTAINER_SUPPORT' customize_envVars+=$'\n value: "true"' - customize_envVars+=$'\n - name: ROX_POLICY_WORKLOAD_TYPE_EXCLUSION' + customize_envVars+=$'\n - name: ROX_POLICY_WORKLOAD_KIND_EXCLUSION' customize_envVars+=$'\n value: "true"' customize_envVars+=$'\n - name: ROX_VIRTUAL_MACHINES_ENHANCED_DATA_MODEL' customize_envVars+=$'\n value: "'"${ROX_VIRTUAL_MACHINES_ENHANCED_DATA_MODEL:-true}"'"' @@ -757,9 +757,9 @@ deploy_sensor_via_operator() { customize_envVars+=$'\n - name: ROX_INIT_CONTAINER_SUPPORT' customize_envVars+=$'\n value: "'"${ROX_INIT_CONTAINER_SUPPORT}"'"' fi - if [[ -n "${ROX_POLICY_WORKLOAD_TYPE_EXCLUSION:-}" ]]; then - customize_envVars+=$'\n - name: ROX_POLICY_WORKLOAD_TYPE_EXCLUSION' - customize_envVars+=$'\n value: "'"${ROX_POLICY_WORKLOAD_TYPE_EXCLUSION}"'"' + if [[ -n "${ROX_POLICY_WORKLOAD_KIND_EXCLUSION:-}" ]]; then + customize_envVars+=$'\n - name: ROX_POLICY_WORKLOAD_KIND_EXCLUSION' + customize_envVars+=$'\n value: "'"${ROX_POLICY_WORKLOAD_KIND_EXCLUSION}"'"' fi local scannerV4DbPersistenceYaml