1apiVersion: apiextensions.k8s.io/v1
2kind: CustomResourceDefinition
3metadata:
4 annotations:
5 exclude.release.openshift.io/internal-openshift-hosted: "true"
6 include.release.openshift.io/self-managed-high-availability: "true"
7 include.release.openshift.io/single-node-developer: "true"
8 api-approved.openshift.io: https://github.com/openshift/api/pull/1032
9 creationTimestamp: null
10 name: machinehealthchecks.machine.openshift.io
11spec:
12 group: machine.openshift.io
13 names:
14 kind: MachineHealthCheck
15 listKind: MachineHealthCheckList
16 plural: machinehealthchecks
17 shortNames:
18 - mhc
19 - mhcs
20 singular: machinehealthcheck
21 scope: Namespaced
22 versions:
23 - additionalPrinterColumns:
24 - description: Maximum number of unhealthy machines allowed
25 jsonPath: .spec.maxUnhealthy
26 name: MaxUnhealthy
27 type: string
28 - description: Number of machines currently monitored
29 jsonPath: .status.expectedMachines
30 name: ExpectedMachines
31 type: integer
32 - description: Current observed healthy machines
33 jsonPath: .status.currentHealthy
34 name: CurrentHealthy
35 type: integer
36 name: v1beta1
37 schema:
38 openAPIV3Schema:
39 description: 'MachineHealthCheck is the Schema for the machinehealthchecks API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).'
40 type: object
41 properties:
42 apiVersion:
43 description: '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'
44 type: string
45 kind:
46 description: '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'
47 type: string
48 metadata:
49 type: object
50 spec:
51 description: Specification of machine health check policy
52 type: object
53 properties:
54 maxUnhealthy:
55 description: Any farther remediation is only allowed if at most "MaxUnhealthy" machines selected by "selector" are not healthy. Expects either a postive integer value or a percentage value. Percentage values must be positive whole numbers and are capped at 100%. Both 0 and 0% are valid and will block all remediation.
56 default: 100%
57 pattern: ^((100|[0-9]{1,2})%|[0-9]+)$
58 anyOf:
59 - type: integer
60 - type: string
61 x-kubernetes-int-or-string: true
62 nodeStartupTimeout:
63 description: Machines older than this duration without a node will be considered to have failed and will be remediated. To prevent Machines without Nodes from being removed, disable startup checks by setting this value explicitly to "0". Expects an unsigned duration string of decimal numbers each with optional fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
64 type: string
65 default: 10m
66 pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
67 remediationTemplate:
68 description: "RemediationTemplate is a reference to a remediation template provided by an infrastructure provider. \n This field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Machine API Operator."
69 type: object
70 properties:
71 apiVersion:
72 description: API version of the referent.
73 type: string
74 fieldPath:
75 description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
76 type: string
77 kind:
78 description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
79 type: string
80 name:
81 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
82 type: string
83 namespace:
84 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
85 type: string
86 resourceVersion:
87 description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
88 type: string
89 uid:
90 description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
91 type: string
92 x-kubernetes-map-type: atomic
93 selector:
94 description: 'Label selector to match machines whose health will be exercised. Note: An empty selector will match all machines.'
95 type: object
96 properties:
97 matchExpressions:
98 description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
99 type: array
100 items:
101 description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
102 type: object
103 required:
104 - key
105 - operator
106 properties:
107 key:
108 description: key is the label key that the selector applies to.
109 type: string
110 operator:
111 description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
112 type: string
113 values:
114 description: 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.
115 type: array
116 items:
117 type: string
118 matchLabels:
119 description: 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.
120 type: object
121 additionalProperties:
122 type: string
123 x-kubernetes-map-type: atomic
124 unhealthyConditions:
125 description: UnhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.
126 type: array
127 minItems: 1
128 items:
129 description: UnhealthyCondition represents a Node condition type and value with a timeout specified as a duration. When the named condition has been in the given status for at least the timeout value, a node is considered unhealthy.
130 type: object
131 properties:
132 status:
133 type: string
134 minLength: 1
135 timeout:
136 description: Expects an unsigned duration string of decimal numbers each with optional fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
137 type: string
138 pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
139 type:
140 type: string
141 minLength: 1
142 status:
143 description: Most recently observed status of MachineHealthCheck resource
144 type: object
145 properties:
146 conditions:
147 description: Conditions defines the current state of the MachineHealthCheck
148 type: array
149 items:
150 description: Condition defines an observation of a Machine API resource operational state.
151 type: object
152 properties:
153 lastTransitionTime:
154 description: 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.
155 type: string
156 format: date-time
157 message:
158 description: A human readable message indicating details about the transition. This field may be empty.
159 type: string
160 reason:
161 description: 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.
162 type: string
163 severity:
164 description: 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.
165 type: string
166 status:
167 description: Status of the condition, one of True, False, Unknown.
168 type: string
169 type:
170 description: 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.
171 type: string
172 currentHealthy:
173 description: total number of machines counted by this machine health check
174 type: integer
175 minimum: 0
176 expectedMachines:
177 description: total number of machines counted by this machine health check
178 type: integer
179 minimum: 0
180 remediationsAllowed:
181 description: RemediationsAllowed is the number of further remediations allowed by this machine health check before maxUnhealthy short circuiting will be applied
182 type: integer
183 format: int32
184 minimum: 0
185 served: true
186 storage: true
187 subresources:
188 status: {}
189status:
190 acceptedNames:
191 kind: ""
192 plural: ""
193 conditions: []
194 storedVersions: []
View as plain text