SV-257565r961620_rule
V-257565
SRG-APP-000435-CTR-001070
CNTR-OS-000800
CAT II
10
Configure a default resource quota as necessary to protect resource over utilization.
1. Create a bootstrap project template by executing the following:
oc adm create-bootstrap-project-template -o yaml > template.yaml
2. Edit the template and add a ResourceQuota object definition before the parameters section.
- apiVersion: v1
kind: ResourceQuota
metadata:
name: example
spec:
hard:
persistentvolumeclaims: "10"
requests.storage: "50Gi"
...
parameters:
3. Apply the project template to the cluster by executing the following:
oc create -f template.yaml -n openshift-config
Details regarding the configuration of resource quotas can be reviewed at https://docs.openshift.com/container-platform/4.8/applications/quotas/quotas-setting-per-project.html.
Verify the new project template includes a default resource quota by executing the following:
oc get templates/project-request -n openshift-config -o jsonpath="{.objects[?(.kind=='ResourceQuota')]}{'\n'}"
Review the ResourceQuota definition. If nothing is return, this is a finding.
V-257565
False
CNTR-OS-000800
Verify the new project template includes a default resource quota by executing the following:
oc get templates/project-request -n openshift-config -o jsonpath="{.objects[?(.kind=='ResourceQuota')]}{'\n'}"
Review the ResourceQuota definition. If nothing is return, this is a finding.
M
5547