Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
593878f1
Commit
593878f1
authored
Oct 12, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15350 from mikedanese/gls-api
add generalized label selector to the experimental API
parents
49b56d17
3645d2f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
types.go
pkg/apis/extensions/types.go
+36
-0
No files found.
pkg/apis/extensions/types.go
View file @
593878f1
...
@@ -638,3 +638,39 @@ type ClusterAutoscalerList struct {
...
@@ -638,3 +638,39 @@ type ClusterAutoscalerList struct {
Items
[]
ClusterAutoscaler
`json:"items"`
Items
[]
ClusterAutoscaler
`json:"items"`
}
}
// A pod selector is a label query over a set of pods. The result of matchLabels and
// matchExpressions are ANDed. An empty pod selector matches all objects. A null
// pod selector matches no objects.
type
PodSelector
struct
{
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
// map is equivalent to an element of matchExpressions, whose key field is "key", the
// operator is "In", and the values array contains only "value". The requirements are ANDed.
MatchLabels
map
[
string
]
string
`json:"matchLabels,omitempty"`
// matchExpressions is a list of pod selector requirements. The requirements are ANDed.
MatchExpressions
[]
PodSelectorRequirement
`json:"matchExpressions,omitempty"`
}
// A pod selector requirement is a selector that contains values, a key and an operator that
// relates the key and values.
type
PodSelectorRequirement
struct
{
// key is the label key that the selector applies to.
Key
string
`json:"key" patchStrategy:"merge" patchMergeKey:"key"`
// operator represents a key's relationship to a set of values.
// Valid operators ard In, NotIn, Exists and DoesNotExist.
Operator
PodSelectorOperator
`json:"operator"`
// values is a set of string values. If the operator is In or NotIn,
// the values set must be non-empty. This array is replaced during a
// strategic merge patch.
Values
[]
string
`json:"stringValues,omitempty"`
}
// A pod selector operator is the set of operators that can be used in a selector requirement.
type
PodSelectorOperator
string
const
(
PodSelectorOpIn
PodSelectorOperator
=
"In"
PodSelectorOpNotIn
PodSelectorOperator
=
"NotIn"
PodSelectorOpExists
PodSelectorOperator
=
"Exists"
PodSelectorOpDoesNotExist
PodSelectorOperator
=
"DoesNotExist"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment