第 10 章 使用 Collector 运行时配置
您可以使用 Collector 运行时配置在不重启 Collector 的情况下修改一些收集器行为。使用名为 collector-config 的 ConfigMap 对象设置 Collector 运行时配置。当您创建或更新 ConfigMap 对象时,Collector 会刷新运行时配置。删除 ConfigMap 对象时,设置会恢复到默认的运行时配置值。
您可以使用 Collector 运行时配置控制以下设置:
-
networking.externalIps.enabled控制是否启用或禁用外部实体功能。默认值为DISABLED。在版本 4.6 中,此设置是networking.externalIps.enable,它是一个布尔值。如需更多信息,请参阅 视觉化外部实体。 -
networking.externalIps.direction指定收集外部 IP 的方向。值为INGRESS、EGRESS或BOTH(默认)。例如,当您选择EGRESS时,它会为所有传出连接提供详细信息,同时聚合传入的连接。 -
networking.maxConnectionsPerMinute是 Collector 每分钟报告的最大开放网络连接数。默认值为 2048。
以下示例只为出站连接启用视觉化外部实体,并将 maxConnectionsPerMinute 设置为 2048。
apiVersion: v1
kind: ConfigMap
metadata:
name: collector-config
namespace: stackrox
data:
runtime_config.yaml: |
networking:
externalIps:
enabled: ENABLED
direction: EGRESS
maxConnectionsPerMinute: 2048