You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've had several times we've needed to delete the ComplianceSuite or ScanSettingBinding objects in order to update settings or resolve an issue with scans failing to complete. By doing this, it triggers the deletion of the owned ComplianceRemediation objects. Because deletion of the ComplianceRemediation does not remove the applied remediation (MachineConfig, KubeletConfig, etc), new scans will not trigger findings and thus won't create new ComplianceRemediation. Additionally, even if the MachineConfig objects were removed, the created files on disk would still exist and are not removed/cleaned up.
Would it be possible to remove the ownerReferences on either the ComplianceRemediation or ComplianceCheckResult objects, thus leaving them behind when a ComplianceScan is deleted. By adding additional labels to these objects with details on which ssg rule and remediation each originate from, it could be possible to then relink the objects to a newly created ComplianceScan object.
The text was updated successfully, but these errors were encountered:
Maybe this is due to incorrect usage of the operator and CRDs, but we are hitting an issue where automatic remediation updates won't work.
compliance-operator/pkg/apis/compliance/v1alpha1/compliancesuite_types.go
Lines 80 to 82 in 7f5d1b9
compliance-operator/pkg/apis/compliance/v1alpha1/compliancesuite_types.go
Lines 29 to 33 in 7f5d1b9
This is primarily due to the
ownerReferences
on theComplianceRemediation
objects created.We've had several times we've needed to delete the
ComplianceSuite
orScanSettingBinding
objects in order to update settings or resolve an issue with scans failing to complete. By doing this, it triggers the deletion of the ownedComplianceRemediation
objects. Because deletion of theComplianceRemediation
does not remove the applied remediation (MachineConfig
,KubeletConfig
, etc), new scans will not trigger findings and thus won't create newComplianceRemediation
. Additionally, even if theMachineConfig
objects were removed, the created files on disk would still exist and are not removed/cleaned up.Would it be possible to remove the
ownerReferences
on either theComplianceRemediation
orComplianceCheckResult
objects, thus leaving them behind when aComplianceScan
is deleted. By adding additional labels to these objects with details on which ssg rule and remediation each originate from, it could be possible to then relink the objects to a newly createdComplianceScan
object.The text was updated successfully, but these errors were encountered: