1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/test/conformance/kuttl/autogen/should-not-autogen/01-manifests.yaml
Charles-Edouard Brétéché 0baf496659
chore: add kuttl autogen tests (#5253)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-08 15:05:49 +00:00

30 lines
622 B
YAML

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: disallow-latest-tag
spec:
validationFailureAction: audit
rules:
- match:
resources:
kinds:
- Pod
- Deployment
name: require-image-tag
validate:
message: An image tag is required.
pattern:
spec:
containers:
- image: '*:*'
- match:
resources:
kinds:
- Pod
name: validate-image-tag
validate:
message: Using a mutable image tag e.g. 'latest' is not allowed.
pattern:
spec:
containers:
- image: '!*:latest'