@@ -1278,6 +1278,33 @@ const (
1278
1278
LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
1279
1279
)
1280
1280
1281
+ // FieldSelectorRequirement is a selector that contains values, a key, and an operator that
1282
+ // relates the key and values.
1283
+ type FieldSelectorRequirement struct {
1284
+ // key is the field selector key that the requirement applies to.
1285
+ Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
1286
+ // operator represents a key's relationship to a set of values.
1287
+ // Valid operators are In, NotIn, Exists, DoesNotExist.
1288
+ // The list of operators may grow in the future.
1289
+ Operator FieldSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=FieldSelectorOperator"`
1290
+ // values is an array of string values.
1291
+ // If the operator is In or NotIn, the values array must be non-empty.
1292
+ // If the operator is Exists or DoesNotExist, the values array must be empty.
1293
+ // +optional
1294
+ // +listType=atomic
1295
+ Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
1296
+ }
1297
+
1298
+ // A field selector operator is the set of operators that can be used in a selector requirement.
1299
+ type FieldSelectorOperator string
1300
+
1301
+ const (
1302
+ FieldSelectorOpIn FieldSelectorOperator = "In"
1303
+ FieldSelectorOpNotIn FieldSelectorOperator = "NotIn"
1304
+ FieldSelectorOpExists FieldSelectorOperator = "Exists"
1305
+ FieldSelectorOpDoesNotExist FieldSelectorOperator = "DoesNotExist"
1306
+ )
1307
+
1281
1308
// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
1282
1309
// that the fieldset applies to.
1283
1310
type ManagedFieldsEntry struct {
0 commit comments