5.4.2.2.4. TailoredProfile オブジェクト
TailoredProfile オブジェクトを使用して、組織の要件に基づいてデフォルトの Profile オブジェクトを変更します。ルールを有効または無効にしたり、変数値を設定したり、カスタマイズの正当性を示したりすることができます。検証後、TailoredProfile オブジェクトは ConfigMap を作成します。これは、ComplianceScan オブジェクトから参照できます。
ScanSettingBinding オブジェクトで参照することにより、TailoredProfile オブジェクトを使用できます。ScanSettingBinding の詳細は、ScanSettingBinding オブジェクトを参照してください。
TailoredProfile オブジェクトの例
apiVersion: compliance.openshift.io/v1alpha1
kind: TailoredProfile
metadata:
name: rhcos4-with-usb
spec:
extends: rhcos4-moderate
title: <title of the tailored profile>
disableRules:
- name: <name of a rule object to be disabled>
rationale: <description of why this rule is checked>
status:
id: xccdf_compliance.openshift.io_profile_rhcos4-with-usb
outputRef:
name: rhcos4-with-usb-tp
namespace: openshift-compliance
state: READY
- 1
- これは任意です。
TailoredProfileがビルドされるProfileオブジェクトの名前。値が設定されていない場合は、enableRulesリストから新しいプロファイルが作成されます。 - 2
- 調整されたプロファイルの XCCDF 名を指定します。
- 3
ConfigMap名を指定します。これは、ComplianceScanのtailoringConfigMap.name属性の値として使用できます。- 4
READY、PENDING、FAILUREなどのオブジェクトの状態を表示します。オブジェクトの状態がERRORの場合、属性status.errorMessageが失敗の理由を提供します。
TailoredProfile オブジェクトを使用すると、TailoredProfile コンストラクトを使用して新しい Profile オブジェクトを作成できます。新しい Profile を作成するには、次の設定パラメーターを設定します。
- 適切なタイトル
-
extendsは空でなければなりません TailoredProfileオブジェクトのスキャンタイプアノテーション:compliance.openshift.io/product-type: Platform/Node注記product-typeのアノテーションを設定していない場合、Compliance Operator はデフォルトでPlatformスキャンタイプになります。TailoredProfileオブジェクトの名前に-node接尾辞を追加すると、nodeスキャンタイプになります。