5.4.2.11. ScanSetting 오브젝트


ScanSetting 오브젝트를 사용하여 운영 정책을 정의하고 재사용하여 검사를 실행하여 여러 검사 바인딩의 구성 반복을 줄일 수 있습니다.

기본적으로 Compliance Operator는 다음 ScanSetting 오브젝트를 생성합니다.

  • Default - 1Gi Persistent Volume (PV)을 사용하여 컨트롤 플레인 및 작업자 노드 모두에서 매일 검사를 실행하고 마지막 세 가지 결과를 유지합니다. 수정은 자동으로 적용되거나 업데이트되지 않습니다.
  • default-auto-apply - 1Gi 영구 볼륨(PV)을 사용하여 컨트롤 플레인 및 작업자 노드 모두에서 매일 검사를 실행하고 마지막 세 가지 결과를 유지합니다. autoApplyRemediationsautoUpdateRemediations 는 모두 true 로 설정됩니다.

예제 ScanSetting 오브젝트

apiVersion: compliance.openshift.io/v1alpha1
autoApplyRemediations: true
autoUpdateRemediations: true
kind: ScanSetting
maxRetryOnTimeout: 3
metadata:
  creationTimestamp: "2022-10-18T20:21:00Z"
  generation: 1
  name: default-auto-apply
  namespace: openshift-compliance
  resourceVersion: "38840"
  uid: 8cb0967d-05e0-4d7a-ac1c-08a7f7e89e84
rawResultStorage:
  nodeSelector:
    node-role.kubernetes.io/master: ""
  pvAccessModes:
  - ReadWriteOnce
  rotation: 3
  size: 1Gi
  tolerations:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master
    operator: Exists
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  - effect: NoSchedule
    key: node.kubernetes.io/memory-pressure
    operator: Exists
roles:
- master
- worker
scanTolerations:
- operator: Exists
schedule: 0 1 * * *
showNotApplicable: false
strictNodeScan: true
timeout: 30m

다음과 같습니다.

autoApplyRemediations
자동 수정을 활성화하려면 true 로 설정합니다. 자동 수정을 비활성화하려면 false 로 설정합니다.
autoUpdateRemediations
콘텐츠 업데이트에 대한 자동 수정을 활성화하려면 true 로 설정합니다. 콘텐츠 업데이트에 대한 자동 수정을 비활성화하려면 false 로 설정합니다.
rawResultStorage.rotation
원시 결과 형식으로 저장된 검사 수를 지정합니다. 기본값은 3입니다. 이전 결과가 순환되면 관리자는 교체를 수행하기 전에 결과를 다른 위치에 저장해야 합니다. 회전 정책을 비활성화하려면 값을 0 으로 설정합니다.
rawResultStorage.size
원시 결과를 저장하기 위해 검사에 생성해야 하는 스토리지 크기를 지정합니다. 기본값은 1Gi 입니다.
스케줄

cron 형식으로 검사를 실행해야 하는 빈도를 지정합니다.

참고

회전 정책을 비활성화하려면 값을 0 으로 설정합니다.

역할
노드 유형에 대한 검사를 예약할 node-role.kubernetes.io 레이블 값을 지정합니다. 이 값은 MachineConfigPool 의 이름과 일치해야 합니다.
5.4.2.11.1. ScanSettingBinding object

ScanSettingBinding 오브젝트를 사용하여 Profile 또는 TailoredProfile 오브젝트에 대한 참조로 규정 준수 요구 사항을 지정할 수 있습니다.

ScanSettingBinding 오브젝트는 검사에 대한 작동 제약 조건을 제공하는 ScanSetting 오브젝트에 연결되어 있습니다. 그런 다음 Compliance Operator는 ScanSettingScanSettingBinding 오브젝트를 기반으로 ComplianceSuite 오브젝트를 생성합니다.

예제 ScanSettingBinding 오브젝트

apiVersion: compliance.openshift.io/v1alpha1
kind: ScanSettingBinding
metadata:
  name: <name of the scan>
profiles:
  # Node checks
  - name: rhcos4-with-usb
    kind: TailoredProfile
    apiGroup: compliance.openshift.io/v1alpha1
  # Cluster checks
  - name: ocp4-moderate
    kind: Profile
    apiGroup: compliance.openshift.io/v1alpha1
settingsRef:
  name: my-companys-constraints
  kind: ScanSetting
  apiGroup: compliance.openshift.io/v1alpha1

다음과 같습니다.

profiles
환경을 검사할 Profile 또는 TailoredProfile 오브젝트의 세부 정보를 지정합니다.
settingsRef
일정 및 스토리지 크기와 같은 작동 제약 조건을 지정합니다.

ScanSettingScanSettingBinding 오브젝트를 생성하면 규정 준수 제품군이 생성됩니다. 규정 준수 제품군 목록을 가져오려면 다음 명령을 실행합니다.

$ oc get compliancesuites
중요

ScanSettingBinding 을 삭제하면 규정 준수 제품군도 삭제됩니다.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동