Skip to content

Commit 970c248

Browse files
committed
Match cel expressions format from celSelectors
Signed-off-by: Ben Perry <[email protected]>
1 parent 40af0d6 commit 970c248

6 files changed

+5
-77
lines changed

addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,7 @@ spec:
187187
CelExpressions defines the CEL expressions to be evaluated for the condition.
188188
Final result is the logical AND of all expressions.
189189
items:
190-
properties:
191-
expression:
192-
description: |-
193-
Expression represents the CEL expression to be evaluated on the manifest.
194-
The expression must evaluate to a bool.
195-
If the expression evaluates to any other type, the condition's status will be False.
196-
Ref to https://kubernetes.io/docs/reference/using-api/cel/ on how to write CEL
197-
Variables:
198-
- object: The current instance of the manifest
199-
type: string
200-
required:
201-
- expression
202-
type: object
190+
type: string
203191
type: array
204192
condition:
205193
description: |-

work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,7 @@ spec:
172172
CelExpressions defines the CEL expressions to be evaluated for the condition.
173173
Final result is the logical AND of all expressions.
174174
items:
175-
properties:
176-
expression:
177-
description: |-
178-
Expression represents the CEL expression to be evaluated on the manifest.
179-
The expression must evaluate to a bool.
180-
If the expression evaluates to any other type, the condition's status will be False.
181-
Ref to https://kubernetes.io/docs/reference/using-api/cel/ on how to write CEL
182-
Variables:
183-
- object: The current instance of the manifest
184-
type: string
185-
required:
186-
- expression
187-
type: object
175+
type: string
188176
type: array
189177
condition:
190178
description: |-

work/v1/types.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ type ConditionRule struct {
138138
// CelExpressions defines the CEL expressions to be evaluated for the condition.
139139
// Final result is the logical AND of all expressions.
140140
// +optional
141-
CelExpressions []CelConditionExpressions `json:"celExpressions"`
141+
CelExpressions []string `json:"celExpressions"`
142142

143143
// Message is set on the condition created for this rule
144144
// +optional
@@ -165,18 +165,6 @@ const (
165165
CelConditionExpressionsType ConditionRuleType = "CEL"
166166
)
167167

168-
type CelConditionExpressions struct {
169-
// Expression represents the CEL expression to be evaluated on the manifest.
170-
// The expression must evaluate to a bool.
171-
// If the expression evaluates to any other type, the condition's status will be False.
172-
// Ref to https://kubernetes.io/docs/reference/using-api/cel/ on how to write CEL
173-
// Variables:
174-
// - object: The current instance of the manifest
175-
// +kubebuilder:validation:Required
176-
// +required
177-
Expression string `json:"expression"`
178-
}
179-
180168
// ManifestWorkExecutor is the executor that applies the resources to the managed cluster. i.e. the
181169
// work agent.
182170
type ManifestWorkExecutor struct {

work/v1/zz_generated.deepcopy.go

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

work/v1/zz_generated.swagger_doc_generated.go

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,7 @@ spec:
195195
CelExpressions defines the CEL expressions to be evaluated for the condition.
196196
Final result is the logical AND of all expressions.
197197
items:
198-
properties:
199-
expression:
200-
description: |-
201-
Expression represents the CEL expression to be evaluated on the manifest.
202-
The expression must evaluate to a bool.
203-
If the expression evaluates to any other type, the condition's status will be False.
204-
Ref to https://kubernetes.io/docs/reference/using-api/cel/ on how to write CEL
205-
Variables:
206-
- object: The current instance of the manifest
207-
type: string
208-
required:
209-
- expression
210-
type: object
198+
type: string
211199
type: array
212200
condition:
213201
description: |-

0 commit comments

Comments
 (0)