-
Notifications
You must be signed in to change notification settings - Fork 1
LabelSelector
Gregory Nickonov edited this page Mar 4, 2019
·
1 revision
R.deployment :backend do
labels.equals feature: :main, component: :backend
labels.in :partition, :feature_1, :feature_3
end
Sunstone property | Kubernetes property | Type |
---|---|---|
match_expressions | matchExpressions | Array of LabelSelectorRequirement |
match_labels | matchLabels | String key to String value map |
Add a set of labels with values to the match_labels
map:
labels.equals feature: :main, component: :backend
Adds a requirement with In
operator to the match_expressions
array:
labels.in :partition, :feature_1, :feature_3
where :partition
is the name of the label and :feature_1
and :feature_3
are items the label will be checked against.
Adds a requirement with NotIn
operator to the match_expressions
array:
labels.not_in :partition, :feature_1, :feature_3
where :partition
is the name of the label and :feature_1
and :feature_3
are items the label will be checked against.
Adds a requirement with Exists
operator to the match_expressions
array:
labels.exists :partition
where :partition
is the name of the label that will be checked for existence.
Adds a requirement with DoesNotExists
operator to the match_expressions
array:
labels.does_not_exists :partition
where :partition
is the name of the label that will be checked for existence.