Documentation
¶
Index ¶
Constants ¶
View Source
const NameLabelKey = "kubernetes.io/metadata.name"
Variables ¶
This section is empty.
Functions ¶
func NewLabelsSelector ¶
func NewLabelsSelector(es []*Requirement) (labels.Selector, error)
Types ¶
type Operator ¶
type Operator string
const ( OperatorIn Operator = "In" OperatorNotIn Operator = "NotIn" OperatorExists Operator = "Exists" )
These are the camel-cased operators that are valid in a kubernetes namespaceSelector.
NOTE! The lowercase variants in the k8s.io/apimachinery/pkg/selection are intended for the selector string representation only. They are invalid in a YAML/JSON manifest!
func (Operator) AsSelectionOperator ¶
type Requirement ¶
type Selector ¶
type Selector struct { MatchLabels map[string]string `json:"matchLabels,omitempty"` MatchExpressions []*Requirement `json:"matchExpressions,omitempty"` }
func SelectorFromNames ¶
func UnmarshalSelector ¶
func UnmarshalSelectorJSON ¶
func (*Selector) GetAllRequirements ¶
func (sel *Selector) GetAllRequirements() []*Requirement
GetAllRequirements transforms the "<key>=<value>" MatchableLabels into "<key> in [<value>]" MatchRequirements and returns the sorted sum of all requirements.
func (*Selector) StaticNames ¶
Click to show internal directories.
Click to hide internal directories.