Datasets:
AutoOntologyBench / source_data /pinned /gatekeeper-library /commit-a8d4799d8daf /src /general /requiredannotations /constraint.tmpl
Download source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/requiredannotations/constraint.tmpl from Vinyeh/AutoOntologyBench: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/datasets/Vinyeh/AutoOntologyBench/resolve/main/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/requiredannotations/constraint.tmpl
- Command line
-
hf download hf://datasets/Vinyeh/AutoOntologyBench/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/requiredannotations/constraint.tmpl
-
curl -L -o constraint.tmpl https://huggingface.co/datasets/Vinyeh/AutoOntologyBench/resolve/main/source_data/pinned/gatekeeper-library/commit-a8d4799d8daf/src/general/requiredannotations/constraint.tmpl
1.41 kB
| apiVersion: templates.gatekeeper.sh/v1 | |
| kind: ConstraintTemplate | |
| metadata: | |
| name: k8srequiredannotations | |
| annotations: | |
| metadata.gatekeeper.sh/title: "Required Annotations" | |
| metadata.gatekeeper.sh/version: 1.0.1 | |
| description: >- | |
| Requires resources to contain specified annotations, with values matching | |
| provided regular expressions. | |
| spec: | |
| crd: | |
| spec: | |
| names: | |
| kind: K8sRequiredAnnotations | |
| validation: | |
| openAPIV3Schema: | |
| type: object | |
| properties: | |
| message: | |
| type: string | |
| annotations: | |
| type: array | |
| description: >- | |
| A list of annotations and values the object must specify. | |
| items: | |
| type: object | |
| properties: | |
| key: | |
| type: string | |
| description: >- | |
| The required annotation. | |
| allowedRegex: | |
| type: string | |
| description: >- | |
| If specified, a regular expression the annotation's value | |
| must match. The value must contain at least one match for | |
| the regular expression. | |
| targets: | |
| - target: admission.k8s.gatekeeper.sh | |
| rego: | | |
| {{ file.Read "src/general/requiredannotations/src.rego" | strings.Indent 8 | strings.TrimSuffix "\n" }} | |