Commit 6d02d20 1 parent be7edd7 commit 6d02d20 Copy full SHA for 6d02d20
File tree 2 files changed +14
-53
lines changed
2 files changed +14
-53
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,21 @@ metadata:
10
10
{ {- end } }
11
11
name: { { .Name } }
12
12
spec:
13
- { {- if .Matchers } }
14
- match: { {- .GetAnnotation " matchers" | toIndentYAML 2 | nindent 4 } }
15
- { {- end } }
16
13
{ {- if ne .Enforcement " deny" } }
17
14
enforcementAction: { { .Enforcement } }
18
15
{ {- end -} }
19
- { {- if .AnnotationParameters } }
20
- parameters: { {- .AnnotationParameters | toIndentYAML 2 | nindent 4 } }
16
+ { {- if or .AnnotationKindMatchers .AnnotationNamespaceMatchers .AnnotationExcludedNamespaceMatchers .AnnotationLabelSelectorMatcher } }
17
+ match:
18
+ { {- if .AnnotationExcludedNamespaceMatchers } }
19
+ excludedNamespaces: { {- .AnnotationExcludedNamespaceMatchers | toIndentYAML 2 | nindent 6 } }
20
+ { {- end } }
21
+ { {- if .AnnotationKindMatchers } }
22
+ kinds: { {- .AnnotationKindMatchers | toJSON | fromJSON | toIndentYAML 2 | nindent 6 } }
23
+ { {- end } }
24
+ { {- if .AnnotationLabelSelectorMatcher } }
25
+ labelSelector: { {- .AnnotationLabelSelectorMatcher | toJSON | fromJSON | toIndentYAML 2 | nindent 6 } }
26
+ { {- end } }
27
+ { {- if .AnnotationNamespaceMatchers } }
28
+ namespaces: { {- .AnnotationNamespaceMatchers | toIndentYAML 2 | nindent 6 } }
29
+ { {- end } }
21
30
{ {- end } }
Original file line number Diff line number Diff line change 32
32
- dev
33
33
- stage
34
34
- prod
35
- parameters :
36
- super :
37
- id : " "
38
- schema : " "
39
- ref : null
40
- description : |-
41
- super duper cool parameter with a description
42
- on two lines.
43
- type : string
44
- format : " "
45
- title : " "
46
- default : null
47
- maximum : null
48
- exclusivemaximum : false
49
- minimum : null
50
- exclusiveminimum : false
51
- maxlength : null
52
- minlength : null
53
- pattern : " "
54
- maxitems : null
55
- minitems : null
56
- uniqueitems : false
57
- multipleof : null
58
- enum : []
59
- maxproperties : null
60
- minproperties : null
61
- required : []
62
- items : null
63
- allof : []
64
- oneof : []
65
- anyof : []
66
- not : null
67
- properties : {}
68
- additionalproperties : null
69
- patternproperties : {}
70
- dependencies : {}
71
- additionalitems : null
72
- definitions : {}
73
- externaldocs : null
74
- example : null
75
- nullable : false
76
- xpreserveunknownfields : null
77
- xembeddedresource : false
78
- xintorstring : false
79
- xlistmapkeys : []
80
- xlisttype : null
81
- xmaptype : null
82
- xvalidations : []
You can’t perform that action at this time.
0 commit comments