name:Ensure each container has a podAntiAffinity [CUSTOM RULE]
defaultMessageOnFailure:You should apply anti-affinity rules to your Deployments and StatefulSet so that Pods are spread in all the nodes of your cluster.
name:Ensure each container has a requests and limits resources [CUSTOM RULE]
defaultMessageOnFailure:An unlimited number of Pods if schedulable on any nodes leading to resource overcommitment and potential node (and kubelet) crashes.
name:Ensure each container has technical labels defined [CUSTOM RULE]
defaultMessageOnFailure:Those labels [name, instance, version, component, part-of, managed-by] are recommended by the official documentation.
schema:
definitions:
specContainers:
properties:
metadata:
properties:
labels:
required:
-app.kubernetes.io/name
-app.kubernetes.io/instance
-app.kubernetes.io/version
-app.kubernetes.io/component
-app.kubernetes.io/part-of
-app.kubernetes.io/managed-by
allOf:
-$ref:'#/definitions/specContainers'
additionalProperties:
$ref:'#'
items:
$ref:'#'
## *.METADATA.LABELS == REQUIRED ALL [owner, project, business-unit]
-identifier:CUSTOM_CONTAINERS_BUSINESS_LABELS
name:Ensure each container has business labels defined [CUSTOM RULE]
defaultMessageOnFailure:You can explore labels and tagging for resources on the AWS tagging strategy page.
schema:
definitions:
specContainers:
properties:
metadata:
properties:
labels:
required:
-owner
-project
-business-unit
allOf:
-$ref:'#/definitions/specContainers'
additionalProperties:
$ref:'#'
items:
$ref:'#'
## *.METADATA.LABELS == REQUIRED ALL [confidentiality, compliance]
-identifier:CUSTOM_CONTAINERS_SECURITY_LABELS
name:Ensure each container has security labels defined [CUSTOM RULE]
defaultMessageOnFailure:You can explore labels and tagging for resources on the AWS tagging strategy page.
schema:
definitions:
specContainers:
properties:
metadata:
properties:
labels:
required:
-confidentiality
-compliance
allOf:
-$ref:'#/definitions/specContainers'
additionalProperties:
$ref:'#'
items:
$ref:'#'
## APIVERSION != [*beta*, *alpha* ]
-identifier:CUSTOM_CONTAINERS_RESTRICT_ALPHA_BETA
name:Ensure each container a restrict access to alpha or beta features [CUSTOM RULE]
defaultMessageOnFailure:Alpha and beta Kubernetes features are in active development and may have limitations or bugs that result in security vulnerabilities.