MachineDrainRule [cluster.x-k8s.io/v1beta1]
- 描述
- MachineDrainRule is the Schema for the MachineDrainRule API.
- 类型
object- 必填
metadataspec
规格
.spec
- 描述
- spec defines the spec of a MachineDrainRule.
- 类型
object- 必填
drain
.spec.drain
- 描述
- drain configures if and how Pods are drained.
- 类型
object- 必填
behavior
.spec.machines
- 描述
- machines defines to which Machines this MachineDrainRule should be applied. If machines is not set, the MachineDrainRule applies to all Machines in the Namespace. If machines contains multiple selectors, the results are ORed. Within a single Machine selector the results of selector and clusterSelector are ANDed. Machines will be selected from all Clusters in the Namespace unless otherwise restricted with the clusterSelector. Example: Selects control plane Machines in all Clusters or Machines with label "os" == "linux" in Clusters with label "stage" == "production". - selector: matchExpressions: - key: cluster.x-k8s.io/control-plane operator: Exists - selector: matchLabels: os: linux clusterSelector: matchExpressions: - key: stage operator: In values: - production
- 类型
array
.spec.machines[]
- 描述
- MachineDrainRuleMachineSelector defines to which Machines this MachineDrainRule should be applied.
- 类型
object
.spec.machines[].clusterSelector
- 描述
- clusterSelector is a label selector which selects Machines by the labels of their Clusters. This field follows standard label selector semantics; if not present or empty, it selects Machines of all Clusters. If selector is also set, then the selector as a whole selects Machines matching selector belonging to Clusters selected by clusterSelector. If selector is not set, it selects all Machines belonging to Clusters selected by clusterSelector.
- 类型
object
.spec.machines[].clusterSelector.matchExpressions
- 描述
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- 类型
array
.spec.machines[].clusterSelector.matchExpressions[]
- 描述
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- 类型
object- 必填
keyoperator
.spec.machines[].clusterSelector.matchExpressions[].values
- 描述
- 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.
- 类型
array
.spec.machines[].clusterSelector.matchExpressions[].values[]
- 类型
string
.spec.machines[].clusterSelector.matchLabels
- 描述
- 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.
- 类型
object
.spec.machines[].selector
- 描述
- selector is a label selector which selects Machines by their labels. This field follows standard label selector semantics; if not present or empty, it selects all Machines. If clusterSelector is also set, then the selector as a whole selects Machines matching selector belonging to Clusters selected by clusterSelector. If clusterSelector is not set, it selects all Machines matching selector in all Clusters.
- 类型
object
.spec.machines[].selector.matchExpressions
- 描述
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- 类型
array
.spec.machines[].selector.matchExpressions[]
- 描述
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- 类型
object- 必填
keyoperator
.spec.machines[].selector.matchExpressions[].values
- 描述
- 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.
- 类型
array
.spec.machines[].selector.matchExpressions[].values[]
- 类型
string
.spec.machines[].selector.matchLabels
- 描述
- 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.
- 类型
object
.spec.pods
- 描述
- pods defines to which Pods this MachineDrainRule should be applied. If pods is not set, the MachineDrainRule applies to all Pods in all Namespaces. If pods contains multiple selectors, the results are ORed. Within a single Pod selector the results of selector and namespaceSelector are ANDed. Pods will be selected from all Namespaces unless otherwise restricted with the namespaceSelector. Example: Selects Pods with label "app" == "logging" in all Namespaces or Pods with label "app" == "prometheus" in the "monitoring" Namespace. - selector: matchExpressions: - key: app operator: In values: - logging - selector: matchLabels: app: prometheus namespaceSelector: matchLabels: kubernetes.io/metadata.name: monitoring
- 类型
array
.spec.pods[]
- 描述
- MachineDrainRulePodSelector defines to which Pods this MachineDrainRule should be applied.
- 类型
object
.spec.pods[].namespaceSelector
- 描述
- namespaceSelector is a label selector which selects Pods by the labels of their Namespaces. This field follows standard label selector semantics; if not present or empty, it selects Pods of all Namespaces. If selector is also set, then the selector as a whole selects Pods matching selector in Namespaces selected by namespaceSelector. If selector is not set, it selects all Pods in Namespaces selected by namespaceSelector.
- 类型
object
.spec.pods[].namespaceSelector.matchExpressions
- 描述
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- 类型
array
.spec.pods[].namespaceSelector.matchExpressions[]
- 描述
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- 类型
object- 必填
keyoperator
.spec.pods[].namespaceSelector.matchExpressions[].values
- 描述
- 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.
- 类型
array
.spec.pods[].namespaceSelector.matchExpressions[].values[]
- 类型
string
.spec.pods[].namespaceSelector.matchLabels
- 描述
- 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.
- 类型
object
.spec.pods[].selector
- 描述
- selector is a label selector which selects Pods by their labels. This field follows standard label selector semantics; if not present or empty, it selects all Pods. If namespaceSelector is also set, then the selector as a whole selects Pods matching selector in Namespaces selected by namespaceSelector. If namespaceSelector is not set, it selects all Pods matching selector in all Namespaces.
- 类型
object
.spec.pods[].selector.matchExpressions
- 描述
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- 类型
array
.spec.pods[].selector.matchExpressions[]
- 描述
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- 类型
object- 必填
keyoperator
.spec.pods[].selector.matchExpressions[].values
- 描述
- 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.
- 类型
array
.spec.pods[].selector.matchExpressions[].values[]
- 类型
string
.spec.pods[].selector.matchLabels
- 描述
- 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.
- 类型
object
API 端点
可用的 API 端点如下:
/apis/cluster.x-k8s.io/v1beta1/namespaces/{namespace}/machinedrainrulesDELETE: delete collection of MachineDrainRuleGET: list objects of kind MachineDrainRulePOST: create a new MachineDrainRule
/apis/cluster.x-k8s.io/v1beta1/namespaces/{namespace}/machinedrainrules/{name}DELETE: delete the specified MachineDrainRuleGET: read the specified MachineDrainRulePATCH: partially update the specified MachineDrainRulePUT: replace the specified MachineDrainRule
/apis/cluster.x-k8s.io/v1beta1/namespaces/{namespace}/machinedrainrules
- HTTP 方法
DELETE- 描述
- delete collection of MachineDrainRule
- HTTP 响应
- HTTP 方法
GET- 描述
- list objects of kind MachineDrainRule
- HTTP 响应
- HTTP 方法
POST- 描述
- create a new MachineDrainRule
- 查询参数
- 请求体参数
- HTTP 响应
/apis/cluster.x-k8s.io/v1beta1/namespaces/{namespace}/machinedrainrules/{name}
- HTTP 方法
DELETE- 描述
- delete the specified MachineDrainRule
- 查询参数
- HTTP 响应
- HTTP 方法
GET- 描述
- read the specified MachineDrainRule
- HTTP 响应
- HTTP 方法
PATCH- 描述
- partially update the specified MachineDrainRule
- 查询参数
- HTTP 响应
- HTTP 方法
PUT- 描述
- replace the specified MachineDrainRule
- 查询参数
- 请求体参数
- HTTP 响应