TMA-OPENSHIFT-VIRT-1.4
Disable downwardMetrics feature gate
Trung bìnhCấp 1Tự độngopenshift-virt
Mô tả
The downwardMetrics feature allows users to collect and monitor additional metrics related to host and virtual machine performance. Audit: Passes when .spec.featureGates.downwardMetrics is false or unset (the default is disabled). Requires oc logged in to the cluster with read access.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
command -v oc >/dev/null 2>&1 || exit 1; v=$(oc get hyperconverged kubevirt-hyperconverged -n openshift-cnv -o jsonpath='{.spec.featureGates.downwardMetrics}') || exit 1; [ "$v" = true ] && echo noncompliant || echo compliant- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Set downwardMetrics to False $ oc patch hyperconverged kubevirt-hyperconverged - n openshift - cnv --type='json' -p='[ {"op": "replace", "path": "/spec/featureGates/downwardMetrics", "value": false }, ]'
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- openshift-virtfeature-gates
- Tham chiếu
- CIS Red Hat OpenShift Virtual Machine Extension Benchmark v1.0.0 - 1.4 Disable downwardMetrics feature gate
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target openshift-virt