Skip to content

Commit 35052c5

Browse files
deads2kk8s-publishing-bot
authored andcommitted
add subjectaccessreview field and label selectors
Co-authored-by: Jordan Liggitt <[email protected]> Kubernetes-commit: 90f0b88b6a5855054460f45edc369f1edea0b97f
1 parent ab06869 commit 35052c5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

pkg/apis/meta/v1/types.go

+27
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,33 @@ const (
12781278
LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
12791279
)
12801280

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+
12811308
// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
12821309
// that the fieldset applies to.
12831310
type ManagedFieldsEntry struct {

0 commit comments

Comments
 (0)