5.6.7.4. ScanSetting リソースの設定
500 を超える MachineConfig を含むクラスターで Compliance Operator を使用する場合、Platform スキャンを実行するときに、ocp4-pci-dss-api-checks-pod Pod が init フェーズで一時停止することがあります。
注記
このプロセスで適用されるリソース制約は、既存のリソース制約を上書きします。
手順
ocp4-pci-dss-api-checks-podPod がInit:OOMKilledステータスでスタックしていることを確認します。$ oc get pod ocp4-pci-dss-api-checks-pod -w出力例
NAME READY STATUS RESTARTS AGE ocp4-pci-dss-api-checks-pod 0/2 Init:1/2 8 (5m56s ago) 25m ocp4-pci-dss-api-checks-pod 0/2 Init:OOMKilled 8 (6m19s ago) 26mScanSettingCR のscanLimits属性を編集して、ocp4-pci-dss-api-checks-podPod で使用可能なメモリーを増やします。timeout: 30m strictNodeScan: true metadata: name: default namespace: openshift-compliance kind: ScanSetting showNotApplicable: false 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 schedule: 0 1 * * * roles: - master - worker apiVersion: compliance.openshift.io/v1alpha1 maxRetryOnTimeout: 3 scanTolerations: - operator: Exists scanLimits: memory: 1024Mi1 - 1
- デフォルト設定は
500Miです。
ScanSettingCR をクラスターに適用します。$ oc apply -f scansetting.yaml