Skip to content

Commit

Permalink
feat: improve defaut compiler (#508)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly authored Sep 21, 2024
1 parent a7d5579 commit f9f1911
Show file tree
Hide file tree
Showing 34 changed files with 592 additions and 261 deletions.
65 changes: 50 additions & 15 deletions .crds/json.kyverno.io_validatingpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ spec:
spec:
description: Policy spec.
properties:
engine:
description: Engine defines the default engine to use when evaluating
compiler:
description: Compiler defines the default compiler to use when evaluating
expressions.
enum:
- jp
Expand All @@ -64,9 +64,9 @@ spec:
check:
description: Check is the assertion check definition.
x-kubernetes-preserve-unknown-fields: true
engine:
description: Engine defines the default engine to
use when evaluating expressions.
compiler:
description: Compiler defines the default compiler
to use when evaluating expressions.
enum:
- jp
- cel
Expand All @@ -88,9 +88,9 @@ spec:
check:
description: Check is the assertion check definition.
x-kubernetes-preserve-unknown-fields: true
engine:
description: Engine defines the default engine to
use when evaluating expressions.
compiler:
description: Compiler defines the default compiler
to use when evaluating expressions.
enum:
- jp
- cel
Expand All @@ -102,14 +102,35 @@ spec:
- check
type: object
type: array
compiler:
description: Compiler defines the default compiler to use
when evaluating expressions.
enum:
- jp
- cel
type: string
type: object
compiler:
description: Compiler defines the default compiler to use when
evaluating expressions.
enum:
- jp
- cel
type: string
context:
description: Context defines variables and data sources that
can be used during rule execution.
items:
description: ContextEntry adds variables and data sources
to a rule context.
properties:
compiler:
description: Compiler defines the default compiler to
use when evaluating expressions.
enum:
- jp
- cel
type: string
name:
description: Name is the entry name.
type: string
Expand All @@ -120,13 +141,6 @@ spec:
- name
type: object
type: array
engine:
description: Engine defines the default engine to use when evaluating
expressions.
enum:
- jp
- cel
type: string
exclude:
description: Exclude defines when this policy rule should not
be applied.
Expand All @@ -145,12 +159,26 @@ spec:
description: AssertionTree represents an assertion tree.
x-kubernetes-preserve-unknown-fields: true
type: array
compiler:
description: Compiler defines the default compiler to use
when evaluating expressions.
enum:
- jp
- cel
type: string
type: object
feedback:
description: Feedback declares rule feedback entries.
items:
description: Feedback contains a feedback entry.
properties:
compiler:
description: Compiler defines the default compiler to
use when evaluating expressions.
enum:
- jp
- cel
type: string
name:
description: Name is the feedback entry name.
type: string
Expand Down Expand Up @@ -184,6 +212,13 @@ spec:
description: AssertionTree represents an assertion tree.
x-kubernetes-preserve-unknown-fields: true
type: array
compiler:
description: Compiler defines the default compiler to use
when evaluating expressions.
enum:
- jp
- cel
type: string
type: object
name:
description: Name is a label to identify the rule, It must be
Expand Down
68 changes: 54 additions & 14 deletions .schemas/json/_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -17636,8 +17636,8 @@
"rules"
],
"properties": {
"engine": {
"description": "Engine defines the default engine to use when evaluating expressions.",
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
Expand Down Expand Up @@ -17673,8 +17673,8 @@
"description": "Check is the assertion check definition.",
"x-kubernetes-preserve-unknown-fields": true
},
"engine": {
"description": "Engine defines the default engine to use when evaluating expressions.",
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
Expand Down Expand Up @@ -17702,8 +17702,8 @@
"description": "Check is the assertion check definition.",
"x-kubernetes-preserve-unknown-fields": true
},
"engine": {
"description": "Engine defines the default engine to use when evaluating expressions.",
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
Expand All @@ -17716,9 +17716,25 @@
}
}
}
},
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
}
}
},
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
},
"context": {
"description": "Context defines variables and data sources that can be used during rule execution.",
"type": "array",
Expand All @@ -17729,6 +17745,14 @@
"name"
],
"properties": {
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
},
"name": {
"description": "Name is the entry name.",
"type": "string"
Expand All @@ -17740,14 +17764,6 @@
}
}
},
"engine": {
"description": "Engine defines the default engine to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
},
"exclude": {
"description": "Exclude defines when this policy rule should not be applied.",
"type": "object",
Expand All @@ -17767,6 +17783,14 @@
"description": "AssertionTree represents an assertion tree.",
"x-kubernetes-preserve-unknown-fields": true
}
},
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
}
}
},
Expand All @@ -17781,6 +17805,14 @@
"value"
],
"properties": {
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
},
"name": {
"description": "Name is the feedback entry name.",
"type": "string"
Expand Down Expand Up @@ -17815,6 +17847,14 @@
"description": "AssertionTree represents an assertion tree.",
"x-kubernetes-preserve-unknown-fields": true
}
},
"compiler": {
"description": "Compiler defines the default compiler to use when evaluating expressions.",
"type": "string",
"enum": [
"jp",
"cel"
]
}
}
},
Expand Down
Loading

0 comments on commit f9f1911

Please sign in to comment.