Skip to content

LabelSelector

Gregory Nickonov edited this page Mar 4, 2019 · 1 revision

Quick Start

R.deployment :backend do
  labels.equals feature: :main, component: :backend
  labels.in :partition, :feature_1, :feature_3
end

LabelSelector

Kubernetes Documentation

Sunstone property Kubernetes property Type
match_expressions matchExpressions Array of LabelSelectorRequirement
match_labels matchLabels String key to String value map

equals

Add a set of labels with values to the match_labels map:

labels.equals feature: :main, component: :backend

in

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.

not_in

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.

exists

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.

does_not_exists

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.

Clone this wiki locally