ITADN
openshift/cluster-etcd-operator
openshift/cluster-etcd-operator · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

cluster-etcd-operator

cluster-etcd-operator (CEO) 是一个负责在集群引导和常规运行期间处理 etcd 缩放的 operator。该 operator 还负责管理 etcd 依赖项(例如 TLS 证书)的供应。

开发 CEO

参见 HACKING.md

常见问题

参见 FAQ.md

安全响应

如果您发现了一个希望保密披露的安全问题, 请联系 Red Hat 产品安全团队。详细信息请访问 https://access.redhat.com/security/team/contact

遥测查询

此 operator 会从每个 OpenShift 集群发送一些遥测数据,这些数据用于帮助我们工程师观察集群及其运行状况。有关正在发送的数据的完整列表,请参见 此文件

要查询这些数据,请确保您有权访问 https://infogw-proxy.api.openshift.com/ 的遥测数据。如果没有,请遵循 https://help.datahub.redhat.com/docs/interacting-with-telemetry-data 此指南。

示例查询

  1. 触发的 etcd 告警数量。

与现有告警相比,这能很好地洞察哪些告警未触发且可能需要调整,或者哪些告警触发过于频繁且我们需要调查原因。

count by (alertname) (alerts{alertname=~"etcd.+"})
  1. 按 gRPC 服务和方法划分的 etcd 慢请求数量。

同样,这有助于调整新的 etcdGRPCRequestsSlow 告警,如果该告警在集群上触发过于频繁,则应予以调查。

count by (grpc_method, grpc_service) (alerts{alertname="etcdGRPCRequestsSlow"})
  1. 各提供商的中位 fsync 磁盘耗时。

这有助于了解哪个提供商的磁盘最慢。 (通常没有提供商是金属机。)

sum without (_id) (quantile by (_id)(0.5, instance:etcd_disk_wal_fsync_duration_seconds:histogram_quantile{quantile="0.99"}) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0)))
  1. 按 OpenShift 版本划分的网络对等节点延迟中位数。
sum without (_id) (quantile by (_id)(0.5, instance:etcd_network_peer_round_trip_time_seconds:histogram_quantile{quantile="0.99"}) + on(_id) group_left(version) (topk by (_id) (1, id_version*0)))
  1. 按 db 大小排序的前 100 个集群。
topk(100, instance:etcd_mvcc_db_total_size_in_use_in_bytes:sum)
  1. 按提供商划分的磁盘提交时长中位数。

(None 通常指金属。)

sum without (_id) (quantile by (_id)(0.5, instance:etcd_disk_backend_commit_duration_seconds:histogram_quantile{quantile="0.99"}) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0)))

测试

本仓库兼容 OpenShift Tests Extension (OTE) 框架。

构建测试二进制文件

make build

运行测试套件和测试

# Run a specific test suite or test
./cluster-etcd-operator-tests-ext run-suite openshift/cluster-etcd-operator/all
./cluster-etcd-operator-tests-ext run-test "test-name"

# Run with JUnit output
./cluster-etcd-operator-tests-ext run-suite openshift/cluster-etcd-operator/all --junit-path=/tmp/junit-results/junit.xml
./cluster-etcd-operator-tests-ext run-test "test-name" --junit-path=/tmp/junit-results/junit.xml

列出可用的测试和套件

# List all test suites
./cluster-etcd-operator-tests-ext list suites

# List tests in a suite
./cluster-etcd-operator-tests-ext list tests --suite=openshift/cluster-etcd-operator/all

#for concurrency
./cluster-etcd-operator-tests-ext run-suite openshift/cluster-etcd-operator/all -c 1

有关 OTE 框架的更多信息,请参阅 openshift-tests-extension 文档