Creating a new tailored profile
You can write a tailored profile from scratch by using the TailoredProfile object. Set an appropriate title and description and leave the extends field empty.
Indicate to the Compliance Operator what type of scan this custom profile will generate:
-
Node scan: Scans the operating system.
-
Platform scan: Scans the Red Hat OpenShift Container Platform configuration.
-
Set the following annotation on the
TailoredProfileobject:Examplenew-profile.yamlapiVersion: compliance.openshift.io/v1alpha1 kind: TailoredProfile metadata: name: new-profile annotations: compliance.openshift.io/product-type: Node spec: extends: ocp4-cis-node description: My custom profile title: Custom profile enableRules: - name: ocp4-etcd-unique-ca rationale: We really need to enable this disableRules: - name: ocp4-file-groupowner-cni-conf rationale: This does not apply to the clusterwhere:
metadata.annotations.compliance.openshift.io/product-type-
Sets
NodeorPlatformaccordingly. spec.extends-
Optional field to specify the base profile.
spec.description-
Specifies the function of the new
TailoredProfileobject. spec.title-
Specifies a title for the
TailoredProfileobject.Adding the
-nodesuffix to thenamefield of theTailoredProfileobject is similar to adding theNodeproduct type annotation and generates an operating system scan.