mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-23 03:54:23 +00:00
Forbid duplicate keys in strict mode (#121)
* Forbid duplicate keys in strict mode Prevents specifying duplicate keys using UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict * Add acceptance tests for duplicated properties
This commit is contained in:
parent
7bf1e01dec
commit
9a6fff13cb
8 changed files with 109 additions and 8 deletions
18
fixtures/duplicate_property.yaml
Normal file
18
fixtures/duplicate_property.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: nginx-ds
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: nginx-ds
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: envoy
|
||||
name: envoy
|
||||
containers:
|
||||
- image: nginx
|
||||
name: nginx
|
||||
Loading…
Add table
Add a link
Reference in a new issue