5.4.2.5. 컴플라이언스 검사 추적
규정 준수 제품군 생성 후 ComplianceSuite 오브젝트를 사용하여 배포된 검사의 상태를 모니터링할 수 있습니다.
5.4.2.5.1. ComplianceSuite 오브젝트 링크 복사링크가 클립보드에 복사되었습니다!
ComplianceSuite 오브젝트를 사용하면 검사 상태를 추적할 수 있습니다. 검사 및 전체 결과를 생성하는 원시 설정이 포함되어 있습니다.
노드 유형 검사의 경우 문제에 대한 수정이 포함되어 있으므로 MachineConfigPool 에 검사를 매핑해야 합니다. 라벨을 지정하는 경우 풀에 직접 적용되었는지 확인합니다.
ComplianceSuite 오브젝트의 예
apiVersion: compliance.openshift.io/v1alpha1
kind: ComplianceSuite
metadata:
name: <name of the scan>
spec:
autoApplyRemediations: false
schedule: "0 1 * * *"
scans:
- name: workers-scan
scanType: Node
profile: xccdf_org.ssgproject.content_profile_moderate
content: ssg-rhcos4-ds.xml
contentImage: registry.redhat.io/compliance/openshift-compliance-content-rhel8@sha256:45dc...
rule: "xccdf_org.ssgproject.content_rule_no_netrc_files"
nodeSelector:
node-role.kubernetes.io/worker: ""
status:
Phase: DONE
Result: NON-COMPLIANT
scanStatuses:
- name: workers-scan
phase: DONE
result: NON-COMPLIANT
백그라운드에서 모음은 scans 매개변수를 기반으로 ComplianceScan 오브젝트를 생성합니다. ComplianceSuites 이벤트를 프로그래밍 방식으로 가져올 수 있습니다. 모음의 이벤트를 가져오려면 다음 명령을 실행합니다.
$ oc get events --field-selector involvedObject.kind=ComplianceSuite,involvedObject.name=<name of the suite>
XCCDF 속성이 포함되어 있으므로 ComplianceSuite 를 수동으로 정의할 때 오류가 발생할 수 있습니다.