Datasets:
AutoOntologyBench / source_data /pinned /gatekeeper-library /commit-a8d4799d8daf /src /general /containerlimits /constraint.tmpl
Download source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/containerlimits/constraint.tmpl from Vinyeh/AutoOntologyBench: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/datasets/Vinyeh/AutoOntologyBench/resolve/main/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/containerlimits/constraint.tmpl
- Command line
-
hf download hf://datasets/Vinyeh/AutoOntologyBench/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/containerlimits/constraint.tmpl
-
curl -L -o constraint.tmpl https://huggingface.co/datasets/Vinyeh/AutoOntologyBench/resolve/main/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/containerlimits/constraint.tmpl
1.79 kB
| apiVersion: templates.gatekeeper.sh/v1 | |
| kind: ConstraintTemplate | |
| metadata: | |
| name: k8scontainerlimits | |
| annotations: | |
| metadata.gatekeeper.sh/title: "Container Limits" | |
| metadata.gatekeeper.sh/version: 1.1.0 | |
| description: >- | |
| Requires containers to have memory and CPU limits set and constrains | |
| limits to be within the specified maximum values. | |
| https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | |
| spec: | |
| crd: | |
| spec: | |
| names: | |
| kind: K8sContainerLimits | |
| validation: | |
| openAPIV3Schema: | |
| type: object | |
| properties: | |
| exemptImages: | |
| description: >- | |
| Any container that uses an image that matches an entry in this list will be excluded | |
| from enforcement. Prefix-matching can be signified with `*`. For example: `my-image-*`. | |
| It is recommended that users use the fully-qualified Docker image name (e.g. start with a domain name) | |
| in order to avoid unexpectedly exempting images from an untrusted repository. | |
| type: array | |
| items: | |
| type: string | |
| cpu: | |
| description: "The maximum allowed cpu limit on a Pod, exclusive. Set to -1 to disable." | |
| type: string | |
| memory: | |
| description: "The maximum allowed memory limit on a Pod, exclusive." | |
| type: string | |
| targets: | |
| - target: admission.k8s.gatekeeper.sh | |
| rego: | | |
| {{ file.Read "src/general/containerlimits/src.rego" | strings.Indent 8 | strings.TrimSuffix "\n" }} | |
| libs: | |
| - | | |
| {{ file.Read "src/general/containerlimits/lib_exempt_container.rego" | strings.Indent 10 | strings.TrimSuffix "\n" }} | |