1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/scenarios/other/scenario_validate_disallow_default_serviceaccount.yaml

18 lines
No EOL
757 B
YAML

# file path relative to project root
input:
policy: test/policy/validate/policy_validate_disallow_default_serviceaccount.yaml
resource: test/resources/resource_validate_disallow_default_serviceaccount.yaml
expected:
validation:
policyresponse:
policy: validate-disallow-default-serviceaccount
resource:
kind: Pod
apiVersion: v1
namespace: ''
name: pod-with-default-sa
rules:
- name: prevent-mounting-default-serviceaccount
type: Validation
message: "Validation error: Prevent mounting of default service account\nValidation rule 'prevent-mounting-default-serviceaccount' failed at path '/spec/serviceAccountName/' for Pod//pod-with-default-sa."
success: false