Creating the FileIntegrity custom resource
An instance of a FileIntegrity custom resource (CR) represents a set of continuous file integrity scans for one or more nodes.
Each FileIntegrity CR is backed by a daemon set running AIDE on the nodes matching the FileIntegrity CR specification.
|
|
For all-in-one control plane and worker nodes, separate |
-
Create the following example
FileIntegrityCR namedworker-fileintegrity.yamlto enable scans on worker nodes:apiVersion: fileintegrity.openshift.io/v1alpha1 kind: FileIntegrity metadata: name: worker-fileintegrity namespace: openshift-file-integrity spec: nodeSelector: node-role.kubernetes.io/worker: "" tolerations: key: "myNode" operator: "Exists" effect: "NoSchedule" config: name: "myconfig" namespace: "openshift-file-integrity" key: "config" gracePeriod: 20 maxBackups: 5 initialDelay: 60 debug: false status: phase: Activespec.nodeSelectorSpecifies the selector for scheduling node scans.
spec.tolerationsSpecify
tolerationsto schedule on nodes with custom taints. When not specified, a default toleration allowing running on main and infra nodes is applied.spec.configSpecify a
ConfigMapcontaining an AIDE configuration to use.spec.config.gracePeriodThe number of seconds to pause in between AIDE integrity checks. Frequent AIDE checks on a node might be resource intensive, so it can be useful to specify a longer interval. Default is 900 seconds (15 minutes).
spec.config.maxBackupsThe maximum number of AIDE database and log backups (leftover from the re-init process) to keep on a node. Older backups beyond this number are automatically pruned by the daemon. Default is set to 5.
spec.config.initialDelayThe number of seconds to wait before starting the first AIDE integrity check. Default is set to 0.
status.phaseThe running status of the
FileIntegrityinstance. Statuses areInitializing,Pending, orActive.InitializingThe
FileIntegrityobject is currently initializing or re-initializing the AIDE database.PendingThe
FileIntegritydeployment is still being created.ActiveThe scans are active and ongoing.
-
Apply the YAML file to the
openshift-file-integritynamespace:$ oc apply -f worker-fileintegrity.yaml -n openshift-file-integrity
-
Confirm the
FileIntegrityobject was created successfully by running the following command:$ oc get fileintegrities -n openshift-file-integrityExample outputNAME AGE worker-fileintegrity 14s