Closed sluetze closed 6 months ago
I created cee59e48091374e3edc6d39fac104ba79650d41d which allowes for automatic checks on etcdbackup using the etcdbackup openshift feature.
I do not want to propose this upstream currently for the following reasons:
for now I will start with a manual rule for etcd backup
Snapshots for the operation of the applications SHOULD also be considered. Snapshots MUST NOT be considered a substitute for backups.
some thoughts on a automatic rule for this.
Opinions?
@nrrso @benruland @ermeratos
A cluster MUST have a backup. The backup MUST include: • Persistent volumes • Configuration files for Kubernetes and the other programs of the control plane • The current state of the Kubernetes cluster, including extensions • Databases of the configuration (namely etcd in this case) • All infrastructure applications required to operate the cluster and the services within it • The data storage of the code and image registries
Check if DataProtectionApplication.oadp.openshift.io/v1alpha1
has .[spec.configuration.velero.defaultPlugins](https://pkg.go.dev/github.com/openshift/oadp-operator/api/v1alpha1#DefaultPlugin)
set to at least openshift
,csi
we should make this configurable, in cases when there is a ROSA Cluster or anything else which requires other / additional plugins.
furthermore we would need to check for an backuplocation
We could check, if there is at least one
policies.config.kio.kasten.io which is valid (.status.validation == Success
), since this would mean, there is a valid backuppolicy.
Both approaches have several shortcomings.
The agnostic approach would be to just check, if the CRDs are available. This would not ensure a compliant configuration, but would fail per default and push the administrator to at least install a solution (and hopefully configure it). this can be easily extended by adding values to a variable. The compliance operator already has the permissions to list the CRDs so this wont be an issue
- rule which checks if quay is installed and then if there is a backup scheduled
after reading into the backup docs, i do not find that useful or even checkable, since the backup mostly is commandline-juggling.
Furthermore the compliance-operator can not really stretch to components, which are not on OCP. Quay (or another registry) might be in one OCP Cluster but not in all of them. So this check would mostly be not useful or a false positive
merged upstream with https://github.com/ComplianceAsCode/content/pull/11717
rules: (there are no rules currently existing, says grep)