Skip to content

Commit

Permalink
add subjectaccessreview field and label selectors
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Liggitt <liggitt@google.com>

Kubernetes-commit: 90f0b88b6a5855054460f45edc369f1edea0b97f
  • Loading branch information
deads2k authored and k8s-publishing-bot committed Jun 4, 2024
1 parent ab06869 commit 35052c5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pkg/apis/meta/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,33 @@ const (
LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
)

// FieldSelectorRequirement is a selector that contains values, a key, and an operator that
// relates the key and values.
type FieldSelectorRequirement struct {
// key is the field selector key that the requirement applies to.
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
// operator represents a key's relationship to a set of values.
// Valid operators are In, NotIn, Exists, DoesNotExist.
// The list of operators may grow in the future.
Operator FieldSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=FieldSelectorOperator"`
// values is an array of string values.
// If the operator is In or NotIn, the values array must be non-empty.
// If the operator is Exists or DoesNotExist, the values array must be empty.
// +optional
// +listType=atomic
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
}

// A field selector operator is the set of operators that can be used in a selector requirement.
type FieldSelectorOperator string

const (
FieldSelectorOpIn FieldSelectorOperator = "In"
FieldSelectorOpNotIn FieldSelectorOperator = "NotIn"
FieldSelectorOpExists FieldSelectorOperator = "Exists"
FieldSelectorOpDoesNotExist FieldSelectorOperator = "DoesNotExist"
)

// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
// that the fieldset applies to.
type ManagedFieldsEntry struct {
Expand Down

0 comments on commit 35052c5

Please sign in to comment.