Menu Close
10.10.4. 配置 PTP 快速事件通知发布程序
要为集群中的网络接口启动使用 PTP fast 事件通知,您必须在 PTP Operator PtpOperatorConfig
自定义资源 (CR) 中启用快速事件发布程序,并在您创建的 PtpConfig
CR 中配置 ptpClockThreshold
值。
先决条件
-
安装 OpenShift Container Platform CLI(
oc
)。 -
以具有
cluster-admin
特权的用户身份登录。 - 安装 PTP Operator 和 AMQ Interconnect Operator。
流程
运行以下命令,修改
PtpOperatorConfig
资源的spec.ptpEventConfig
字段并设置适当的值:$ oc edit PtpOperatorConfig default -n openshift-ptp
... spec: daemonNodeSelector: node-role.kubernetes.io/worker: "" ptpEventConfig: enableEventPublisher: true 1 transportHost: amqp://<instance_name>.<namespace>.svc.cluster.local 2
为启用 PTP 的接口创建一个
PtpConfig
自定义资源,并为ptpClockThreshold
设置所需的值,例如:apiVersion: ptp.openshift.io/v1 kind: PtpConfig metadata: name: example-ptpconfig namespace: openshift-ptp spec: profile: - name: "profile1" interface: "enp5s0f0" ptp4lOpts: "-2 -s --summary_interval -4" phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" ptpClockThreshold: holdOverTimeout: 5 1 maxOffsetThreshold: 100 2 minOffsetThreshold: -100 3 recommend: - profile: "profile1" priority: 4 match: - nodeLabel: "node-role.kubernetes.io/worker"