This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.3. 创建用于设置指标集合的角色
此流程演示了如何创建一个允许用户为服务设置指标集合的角色,如“设置指标集合”中所述。
流程
-
为新角色创建 YAML 文件。在本例中,该文件名为
custom-metrics-role.yaml
。 使用
monitor-crd-edit
角色的配置填充该文件:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 该角色可让用户为服务设置指标集合。
将配置文件应用到集群:
oc apply -f custom-metrics-role.yaml
$ oc apply -f custom-metrics-role.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 现在角色已创建。