Skip to content

Placement

Placement CRD schema reference (group scheduling.kcp.io)

Placement defines a selection rule to choose ONE location for MULTIPLE namespaces in a workspace. placement is in Pending state initially. When a location is selected by the placement, the placement turns to Unbound state. In Pending or Unbound state, the selection rule can be updated to select another location. When the a namespace is annotated by another controller or user with the key of "scheduling.kcp.io/placement", the namespace will pick one placement, and this placement is transferred to Bound state. Any update to spec of the placement is ignored in Bound state and reflected in the conditions. The placement will turn back to Unbound state when no namespace uses this placement any more.
Full name:
placements.scheduling.kcp.io
Group:
scheduling.kcp.io
Singular name:
placement
Plural name:
placements
Scope:
Cluster
Versions:
v1alpha1

Version v1alpha1

Properties

.apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

.kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

.metadata

object

.spec

object

.spec.locationResource

object Required

locationResource is the group-version-resource of the instances that are subject to the locations to select.

.spec.locationResource.group

string

group is the name of an API group.

.spec.locationResource.resource

string Required

resource is the name of the resource.

.spec.locationResource.version

string Required

version is the version of the API.

.spec.locationSelectors

array

locationSelectors represents a slice of label selector to select a location, these label selectors are logically ORed.

.spec.locationSelectors[*]

object

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

.spec.locationSelectors[*].matchExpressions

array

matchExpressions is a list of label selector requirements. The requirements are ANDed.

.spec.locationSelectors[*].matchExpressions[*]

object

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

.spec.locationSelectors[*].matchExpressions[*].key

string Required

key is the label key that the selector applies to.

.spec.locationSelectors[*].matchExpressions[*].operator

string Required

operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

.spec.locationSelectors[*].matchExpressions[*].values

array

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. This array is replaced during a strategic merge patch.

.spec.locationSelectors[*].matchExpressions[*].values[*]

string

.spec.locationSelectors[*].matchLabels

object

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.

.spec.locationWorkspace

string

locationWorkspace is an absolute reference to a workspace for the location. If it is not set, the workspace of APIBinding will be used.

.spec.namespaceSelector

object

namespaceSelector is a label selector to select ns. It match all ns by default, but can be specified to a certain set of ns.

.spec.namespaceSelector.matchExpressions

array

matchExpressions is a list of label selector requirements. The requirements are ANDed.

.spec.namespaceSelector.matchExpressions[*]

object

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

.spec.namespaceSelector.matchExpressions[*].key

string Required

key is the label key that the selector applies to.

.spec.namespaceSelector.matchExpressions[*].operator

string Required

operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

.spec.namespaceSelector.matchExpressions[*].values

array

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. This array is replaced during a strategic merge patch.

.spec.namespaceSelector.matchExpressions[*].values[*]

string

.spec.namespaceSelector.matchLabels

object

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.

.status

object

.status.conditions

array

Current processing state of the Placement.

.status.conditions[*]

object

Condition defines an observation of a object operational state.

.status.conditions[*].lastTransitionTime

string Required

Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

.status.conditions[*].message

string

A human readable message indicating details about the transition. This field may be empty.

.status.conditions[*].reason

string

The reason for the condition’s last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty.

.status.conditions[*].severity

string

Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False.

.status.conditions[*].status

string Required

Status of the condition, one of True, False, Unknown.

.status.conditions[*].type

string Required

Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important.

.status.phase

string

phase is the current phase of the placement

.status.selectedLocation

object

selectedLocation is the location that a picked by this placement.

.status.selectedLocation.locationName

string Required

Name of the Location.

.status.selectedLocation.path

string Required

path is an absolute reference to a workspace, e.g. root:org:ws. The workspace must be some ancestor or a child of some ancestor.