5.6.6.2. ScanSetting スキャンの PriorityClass の設定
大規模な環境では、デフォルトの PriorityClass オブジェクトの優先順位が低すぎて、Pod が時間どおりにスキャンを実行することを保証できない場合があります。コンプライアンスを維持するか、自動スキャンを保証する必要のあるクラスターの場合、PriorityClass 変数を設定して、Compliance Operator がリソースの制約の状況で常に優先順位が指定されるようにします。
前提条件
-
オプション:
PriorityClassオブジェクトを作成した。詳細は、関連情報 の「優先順位およびプリエンプションの設定」を参照してください。
手順
PriorityClass変数を設定します。apiVersion: compliance.openshift.io/v1alpha1 strictNodeScan: true metadata: name: default namespace: openshift-compliance priorityClass: compliance-high-priority1 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 scanTolerations: - operator: Exists- 1
ScanSettingで参照されるPriorityClassが見つからない場合、Operator はPriorityClassを空のままで警告を発行し、PriorityClassなしでスキャンのスケジュールを続行します。