Skip to content

Commit f50885c

Browse files
Added CEL to list of valid ExpressionLangs (#188)
Signed-off-by: Venera <31911811+venera-program@users.noreply.github.com>
1 parent 5a23a17 commit f50885c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

model/workflow.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (i ExpressionLangType) KindValues() []string {
7575
return []string{
7676
string(JqExpressionLang),
7777
string(JsonPathExpressionLang),
78+
string(CELExpressionLang),
7879
}
7980
}
8081

@@ -88,6 +89,9 @@ const (
8889

8990
// JsonPathExpressionLang ...
9091
JsonPathExpressionLang ExpressionLangType = "jsonpath"
92+
93+
// CELExpressionLang
94+
CELExpressionLang ExpressionLangType = "cel"
9195
)
9296

9397
// BaseWorkflow describes the partial Workflow definition that does not rely on generic interfaces
@@ -132,7 +136,7 @@ type BaseWorkflow struct {
132136
// +optional
133137
Constants *Constants `json:"constants,omitempty"`
134138
// Identifies the expression language used for workflow expressions. Default is 'jq'.
135-
// +kubebuilder:validation:Enum=jq;jsonpath
139+
// +kubebuilder:validation:Enum=jq;jsonpath;cel
136140
// +kubebuilder:default=jq
137141
// +optional
138142
ExpressionLang ExpressionLangType `json:"expressionLang,omitempty" validate:"required,oneofkind"`

model/workflow_validator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ workflow.key required when "workflow.id" is not defined`,
162162
model.BaseWorkflow.ExpressionLang = JqExpressionLang + "invalid"
163163
return *model
164164
},
165-
Err: `workflow.expressionLang need by one of [jq jsonpath]`,
165+
Err: `workflow.expressionLang need by one of [jq jsonpath cel]`,
166166
},
167167
}
168168

0 commit comments

Comments
 (0)