cluster.x-k8s.io / v1beta2 / ClusterClass
- string
.apiVersion
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
- string
.kind
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
- object
.metadata
- object
.spec
spec is the desired state of ClusterClass.
- array
.spec .availabilityGates
availabilityGates specifies additional conditions to include when evaluating Cluster Available condition.
NOTE: If a Cluster is using this ClusterClass, and this Cluster defines a custom list of availabilityGates, such list overrides availabilityGates defined in this field.
- string required
.spec .availabilityGates[] .conditionType
conditionType refers to a condition with matching type in the Cluster’s condition list. If the conditions doesn’t exist, it will be treated as unknown. Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as availability gates.
- string
.spec .availabilityGates[] .polarity
polarity of the conditionType specified in this availabilityGate. Valid values are Positive, Negative and omitted. When omitted, the default behaviour will be Positive. A positive polarity means that the condition should report a true status under normal conditions. A negative polarity means that the condition should report a false status under normal conditions.
- object
.spec .controlPlane
controlPlane is a reference to a local struct that holds the details for provisioning the Control Plane for the Cluster.
- object
.spec .controlPlane .machineHealthCheck
machineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. This field is supported if and only if the ControlPlane provider template referenced above is Machine based and supports setting replicas.
- integer | string
.spec .controlPlane .machineHealthCheck .maxUnhealthy
maxUnhealthy specifies the maximum number of unhealthy machines allowed. Any further remediation is only allowed if at most “maxUnhealthy” machines selected by “selector” are not healthy.
- string
.spec .controlPlane .machineHealthCheck .nodeStartupTimeout
nodeStartupTimeout allows to set the maximum time for MachineHealthCheck to consider a Machine unhealthy if a corresponding Node isn’t associated through a
Spec.ProviderID
field.The duration set in this field is compared to the greatest of:
- Cluster’s infrastructure ready condition timestamp (if and when available)
- Control Plane’s initialized condition timestamp (if and when available)
- Machine’s infrastructure ready condition timestamp (if and when available)
- Machine’s metadata creation timestamp
Defaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.
- object
.spec .controlPlane .machineHealthCheck .remediationTemplate
remediationTemplate is a reference to a remediation template provided by an infrastructure provider.
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 Cluster API.
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .apiVersion
API version of the referent.
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .fieldPath
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.
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .resourceVersion
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
- string
.spec .controlPlane .machineHealthCheck .remediationTemplate .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- array
.spec .controlPlane .machineHealthCheck .unhealthyConditions
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.
- string required
.spec .controlPlane .machineHealthCheck .unhealthyConditions[] .status
status of the condition, one of True, False, Unknown.
- string required
.spec .controlPlane .machineHealthCheck .unhealthyConditions[] .timeout
timeout is the duration that a node must be in a given status for, after which the node is considered unhealthy. For example, with a value of “1h”, the node must match the status for at least 1 hour before being considered unhealthy.
- string required
.spec .controlPlane .machineHealthCheck .unhealthyConditions[] .type
type of Node condition
- string
.spec .controlPlane .machineHealthCheck .unhealthyRange
unhealthyRange specifies the range of unhealthy machines allowed. Any further remediation is only allowed if the number of machines selected by “selector” as not healthy is within the range of “unhealthyRange”. Takes precedence over maxUnhealthy. Eg. “[3-5]” - This means that remediation will be allowed only when: (a) there are at least 3 unhealthy machines (and) (b) there are at most 5 unhealthy machines
- object
.spec .controlPlane .machineInfrastructure
machineInfrastructure defines the metadata and infrastructure information for control plane machines.
This field is supported if and only if the control plane provider template referenced above is Machine based and supports setting replicas.
- object required
.spec .controlPlane .machineInfrastructure .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .controlPlane .machineInfrastructure .ref .apiVersion
API version of the referent.
- string
.spec .controlPlane .machineInfrastructure .ref .fieldPath
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.
- string
.spec .controlPlane .machineInfrastructure .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .controlPlane .machineInfrastructure .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .controlPlane .machineInfrastructure .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .controlPlane .machineInfrastructure .ref .resourceVersion
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
- string
.spec .controlPlane .machineInfrastructure .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object
.spec .controlPlane .metadata
metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the topology.
This field is supported if and only if the control plane provider template referenced is Machine based.
- object
.spec .controlPlane .metadata .annotations
annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
- object
.spec .controlPlane .metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
- object
.spec .controlPlane .namingStrategy
namingStrategy allows changing the naming pattern used when creating the control plane provider object.
- string
.spec .controlPlane .namingStrategy .template
template defines the template to use for generating the name of the ControlPlane object. If not defined, it will fallback to
{{ .cluster.name }}-{{ .random }}
. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments:.cluster.name
: The name of the cluster object..random
: A random alphanumeric string, without vowels, of length 5.
- string
.spec .controlPlane .nodeDeletionTimeout
nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology.
- string
.spec .controlPlane .nodeDrainTimeout
nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from
kubectl drain --timeout
NOTE: This value can be overridden while defining a Cluster.Topology. - string
.spec .controlPlane .nodeVolumeDetachTimeout
nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology.
- array
.spec .controlPlane .readinessGates
readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
This field can be used e.g. to instruct the machine controller to include in the computation for Machine’s ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.
NOTE: This field is considered only for computing v1beta2 conditions. NOTE: If a Cluster defines a custom list of readinessGates for the control plane, such list overrides readinessGates defined in this field. NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates; e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
- string required
.spec .controlPlane .readinessGates[] .conditionType
conditionType refers to a condition with matching type in the Machine’s condition list. If the conditions doesn’t exist, it will be treated as unknown. Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates.
- string
.spec .controlPlane .readinessGates[] .polarity
polarity of the conditionType specified in this readinessGate. Valid values are Positive, Negative and omitted. When omitted, the default behaviour will be Positive. A positive polarity means that the condition should report a true status under normal conditions. A negative polarity means that the condition should report a false status under normal conditions.
- object required
.spec .controlPlane .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .controlPlane .ref .apiVersion
API version of the referent.
- string
.spec .controlPlane .ref .fieldPath
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.
- string
.spec .controlPlane .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .controlPlane .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .controlPlane .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .controlPlane .ref .resourceVersion
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
- string
.spec .controlPlane .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object
.spec .infrastructure
infrastructure is a reference to a provider-specific template that holds the details for provisioning infrastructure specific cluster for the underlying provider. The underlying provider is responsible for the implementation of the template to an infrastructure cluster.
- object required
.spec .infrastructure .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .infrastructure .ref .apiVersion
API version of the referent.
- string
.spec .infrastructure .ref .fieldPath
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.
- string
.spec .infrastructure .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .infrastructure .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .infrastructure .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .infrastructure .ref .resourceVersion
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
- string
.spec .infrastructure .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object
.spec .infrastructureNamingStrategy
infrastructureNamingStrategy allows changing the naming pattern used when creating the infrastructure object.
- string
.spec .infrastructureNamingStrategy .template
template defines the template to use for generating the name of the Infrastructure object. If not defined, it will fallback to
{{ .cluster.name }}-{{ .random }}
. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments:.cluster.name
: The name of the cluster object..random
: A random alphanumeric string, without vowels, of length 5.
- array
.spec .patches
patches defines the patches which are applied to customize referenced templates of a ClusterClass. Note: Patches will be applied in the order of the array.
- array
.spec .patches[] .definitions
definitions define inline patches. Note: Patches will be applied in the order of the array. Note: Exactly one of Definitions or External must be set.
- array required
.spec .patches[] .definitions[] .jsonPatches
jsonPatches defines the patches which should be applied on the templates matching the selector. Note: Patches will be applied in the order of the array.
- string required
.spec .patches[] .definitions[] .jsonPatches[] .op
op defines the operation of the patch. Note: Only
add
,replace
andremove
are supported. - string required
.spec .patches[] .definitions[] .jsonPatches[] .path
path defines the path of the patch. Note: Only the spec of a template can be patched, thus the path has to start with /spec/. Note: For now the only allowed array modifications are
append
andprepend
, i.e.:- for op:
add
: only index 0 (prepend) and - (append) are allowed - for op:
replace
orremove
: no indexes are allowed
- for op:
- undefined
.spec .patches[] .definitions[] .jsonPatches[] .value
value defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time. Note: We have to use apiextensionsv1.JSON instead of our JSON type, because controller-tools has a hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type (unset type field). Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111
- object
.spec .patches[] .definitions[] .jsonPatches[] .valueFrom
valueFrom defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time.
- string
.spec .patches[] .definitions[] .jsonPatches[] .valueFrom .template
template is the Go template to be used to calculate the value. A template can reference variables defined in .spec.variables and builtin variables. Note: The template must evaluate to a valid YAML or JSON value.
- string
.spec .patches[] .definitions[] .jsonPatches[] .valueFrom .variable
variable is the variable to be used as value. Variable can be one of the variables defined in .spec.variables or a builtin variable.
- object required
.spec .patches[] .definitions[] .selector
selector defines on which templates the patch should be applied.
- string required
.spec .patches[] .definitions[] .selector .apiVersion
apiVersion filters templates by apiVersion.
- string required
.spec .patches[] .definitions[] .selector .kind
kind filters templates by kind.
- object required
.spec .patches[] .definitions[] .selector .matchResources
matchResources selects templates based on where they are referenced.
- boolean
.spec .patches[] .definitions[] .selector .matchResources .controlPlane
controlPlane selects templates referenced in .spec.ControlPlane. Note: this will match the controlPlane and also the controlPlane machineInfrastructure (depending on the kind and apiVersion).
- boolean
.spec .patches[] .definitions[] .selector .matchResources .infrastructureCluster
infrastructureCluster selects templates referenced in .spec.infrastructure.
- object
.spec .patches[] .definitions[] .selector .matchResources .machineDeploymentClass
machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in .spec.workers.machineDeployments.
- array
.spec .patches[] .definitions[] .selector .matchResources .machineDeploymentClass .names
names selects templates by class names.
- object
.spec .patches[] .definitions[] .selector .matchResources .machinePoolClass
machinePoolClass selects templates referenced in specific MachinePoolClasses in .spec.workers.machinePools.
- array
.spec .patches[] .definitions[] .selector .matchResources .machinePoolClass .names
names selects templates by class names.
- string
.spec .patches[] .description
description is a human-readable description of this patch.
- string
.spec .patches[] .enabledIf
enabledIf is a Go template to be used to calculate if a patch should be enabled. It can reference variables defined in .spec.variables and builtin variables. The patch will be enabled if the template evaluates to
true
, otherwise it will be disabled. If EnabledIf is not set, the patch will be enabled per default. - object
.spec .patches[] .external
external defines an external patch. Note: Exactly one of Definitions or External must be set.
- string
.spec .patches[] .external .discoverVariablesExtension
discoverVariablesExtension references an extension which is called to discover variables.
- string
.spec .patches[] .external .generateExtension
generateExtension references an extension which is called to generate patches.
- object
.spec .patches[] .external .settings
settings defines key value pairs to be passed to the extensions. Values defined here take precedence over the values defined in the corresponding ExtensionConfig.
- string
.spec .patches[] .external .validateExtension
validateExtension references an extension which is called to validate the topology.
- string required
.spec .patches[] .name
name of the patch.
- array
.spec .variables
variables defines the variables which can be configured in the Cluster topology and are then used in patches.
- object
.spec .variables[] .metadata
metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.
Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please use XMetadata in JSONSchemaProps instead.
- object
.spec .variables[] .metadata .annotations
annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.
- object
.spec .variables[] .metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.
- string required
.spec .variables[] .name
name of the variable.
- boolean required
.spec .variables[] .required
required specifies if the variable is required. Note: this applies to the variable as a whole and thus the top-level object defined in the schema. If nested fields are required, this will be specified inside the schema.
- object required
.spec .variables[] .schema
schema defines the schema of the variable.
- object required
.spec .variables[] .schema .openAPIV3Schema
openAPIV3Schema defines the schema of a variable via OpenAPI v3 schema. The schema is a subset of the schema used in Kubernetes CRDs.
- undefined
.spec .variables[] .schema .openAPIV3Schema .additionalProperties
additionalProperties specifies the schema of values in a map (keys are always strings). NOTE: Can only be set if type is object. NOTE: AdditionalProperties is mutually exclusive with Properties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.spec .variables[] .schema .openAPIV3Schema .allOf
allOf specifies that the variable must validate against all of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.spec .variables[] .schema .openAPIV3Schema .anyOf
anyOf specifies that the variable must validate against one or more of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.spec .variables[] .schema .openAPIV3Schema .default
default is the default value of the variable. NOTE: Can be set for all types.
- string
.spec .variables[] .schema .openAPIV3Schema .description
description is a human-readable description of this variable.
- array
.spec .variables[] .schema .openAPIV3Schema .enum
enum is the list of valid values of the variable. NOTE: Can be set for all types.
- undefined
.spec .variables[] .schema .openAPIV3Schema .example
example is an example for this variable.
- boolean
.spec .variables[] .schema .openAPIV3Schema .exclusiveMaximum
exclusiveMaximum specifies if the Maximum is exclusive. NOTE: Can only be set if type is integer or number.
- boolean
.spec .variables[] .schema .openAPIV3Schema .exclusiveMinimum
exclusiveMinimum specifies if the Minimum is exclusive. NOTE: Can only be set if type is integer or number.
- string
.spec .variables[] .schema .openAPIV3Schema .format
format is an OpenAPI v3 format string. Unknown formats are ignored. For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we’re currently using) https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go NOTE: Can only be set if type is string.
- undefined
.spec .variables[] .schema .openAPIV3Schema .items
items specifies fields of an array. NOTE: Can only be set if type is array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- integer
.spec .variables[] .schema .openAPIV3Schema .maxItems
maxItems is the max length of an array variable. NOTE: Can only be set if type is array.
- integer
.spec .variables[] .schema .openAPIV3Schema .maxLength
maxLength is the max length of a string variable. NOTE: Can only be set if type is string.
- integer
.spec .variables[] .schema .openAPIV3Schema .maxProperties
maxProperties is the maximum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.
- integer
.spec .variables[] .schema .openAPIV3Schema .maximum
maximum is the maximum of an integer or number variable. If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. NOTE: Can only be set if type is integer or number.
- integer
.spec .variables[] .schema .openAPIV3Schema .minItems
minItems is the min length of an array variable. NOTE: Can only be set if type is array.
- integer
.spec .variables[] .schema .openAPIV3Schema .minLength
minLength is the min length of a string variable. NOTE: Can only be set if type is string.
- integer
.spec .variables[] .schema .openAPIV3Schema .minProperties
minProperties is the minimum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.
- integer
.spec .variables[] .schema .openAPIV3Schema .minimum
minimum is the minimum of an integer or number variable. If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. NOTE: Can only be set if type is integer or number.
- undefined
.spec .variables[] .schema .openAPIV3Schema .not
not specifies that the variable must not validate against the subschema. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.spec .variables[] .schema .openAPIV3Schema .oneOf
oneOf specifies that the variable must validate against exactly one of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- string
.spec .variables[] .schema .openAPIV3Schema .pattern
pattern is the regex which a string variable must match. NOTE: Can only be set if type is string.
- undefined
.spec .variables[] .schema .openAPIV3Schema .properties
properties specifies fields of an object. NOTE: Can only be set if type is object. NOTE: Properties is mutually exclusive with AdditionalProperties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- array
.spec .variables[] .schema .openAPIV3Schema .required
required specifies which fields of an object are required. NOTE: Can only be set if type is object.
- string
.spec .variables[] .schema .openAPIV3Schema .type
type is the type of the variable. Valid values are: object, array, string, integer, number or boolean.
- boolean
.spec .variables[] .schema .openAPIV3Schema .uniqueItems
uniqueItems specifies if items in an array must be unique. NOTE: Can only be set if type is array.
- boolean
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-int-or-string
x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:
- anyOf:
- type: integer
- type: string
- allOf:
- anyOf:
- type: integer
- type: string
- … zero or more
- anyOf:
- anyOf:
- boolean
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-preserve-unknown-fields
x-kubernetes-preserve-unknown-fields allows setting fields in a variable object which are not defined in the variable schema. This affects fields recursively, except if nested properties or additionalProperties are specified in the schema.
- array
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations
x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
- string
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations[] .fieldPath
fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute
foo
under a maptestMap
, the fieldPath could be set to.testMap.foo
If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g..testList
It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to JSONPath support in Kubernetes for more info. Numeric index of array is not supported. For field name which contains special characters, use['specialName']
to refer the field name. e.g. for attributefoo.34$
appears in a listtestList
, the fieldPath could be set to.testList['foo.34$']
- string
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations[] .message
message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host”
- string
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations[] .messageExpression
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: “x must be less than max (“+string(self.max)+”)”
- string
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations[] .reason
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The currently supported reasons are: “FieldValueInvalid”, “FieldValueForbidden”, “FieldValueRequired”, “FieldValueDuplicate”. If not set, default to use “FieldValueInvalid”. All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.
- string required
.spec .variables[] .schema .openAPIV3Schema .x-kubernetes-validations[] .rule
rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The
self
variable in the CEL expression is bound to the scoped value. If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable viaself.field
and field presence can be checked viahas(self.field)
. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible viaself[mapKey]
, map containment can be checked viamapKey in self
and all entries of the map are accessible via CEL macros and functions such asself.all(...)
. If the Rule is scoped to an array, the elements of the array are accessible viaself[i]
and also by macros and functions. If the Rule is scoped to a scalar,self
is bound to the scalar value. Examples:- Rule scoped to a map of objects: {“rule”: “self.components[‘Widget’].priority < 10"}
- Rule scoped to a list of integers: {“rule”: “self.values.all(value, value >= 0 && value < 100)"}
- Rule scoped to a string value: {“rule”: “self.startsWith(‘kube’)”}
Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes:
- Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields.
- Object properties where the property schema is of an “unknown type”. An “unknown type” is recursively defined as:
- A schema with no type and x-kubernetes-preserve-unknown-fields set to true
- An array where the items schema is of an “unknown type”
- An object where the additionalProperties schema is of an “unknown type”
Only property names of the form
[a-zA-Z_.-/][a-zA-Z0-9_.-/]*
are accessible. Accessible property names are escaped according to the following rules when accessed in the expression:- ’__’ escapes to ‘underscores’
- ’.’ escapes to ‘dot’
- ’-’ escapes to ‘dash’
- ’/’ escapes to ‘slash’
- Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}’. The keywords are: “true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”, “import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Rule accessing a property named “namespace”: {“rule”: “self.namespace > 0”}
- Rule accessing a property named “x-prop”: {“rule”: “self.x__dash__prop > 0”}
- Rule accessing a property named “redact__d”: {“rule”: “self.redact__underscores__d > 0”}
If
rule
makes use of theoldSelf
variable it is implicitly atransition rule
.By default, the
oldSelf
variable is the same type asself
.Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found.
- object
.spec .variables[] .schema .openAPIV3Schema .x-metadata
x-metadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.
- object
.spec .variables[] .schema .openAPIV3Schema .x-metadata .annotations
annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.
- object
.spec .variables[] .schema .openAPIV3Schema .x-metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.
- object
.spec .workers
workers describes the worker nodes for the cluster. It is a collection of node types which can be used to create the worker nodes of the cluster.
- array
.spec .workers .machineDeployments
machineDeployments is a list of machine deployment classes that can be used to create a set of worker nodes.
- string required
.spec .workers .machineDeployments[] .class
class denotes a type of worker node present in the cluster, this name MUST be unique within a ClusterClass and can be referenced in the Cluster to create a managed MachineDeployment.
- string
.spec .workers .machineDeployments[] .failureDomain
failureDomain is the failure domain the machines will be created in. Must match a key in the FailureDomains map stored on the cluster object. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
- object
.spec .workers .machineDeployments[] .machineHealthCheck
machineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass.
- integer | string
.spec .workers .machineDeployments[] .machineHealthCheck .maxUnhealthy
maxUnhealthy specifies the maximum number of unhealthy machines allowed. Any further remediation is only allowed if at most “maxUnhealthy” machines selected by “selector” are not healthy.
- string
.spec .workers .machineDeployments[] .machineHealthCheck .nodeStartupTimeout
nodeStartupTimeout allows to set the maximum time for MachineHealthCheck to consider a Machine unhealthy if a corresponding Node isn’t associated through a
Spec.ProviderID
field.The duration set in this field is compared to the greatest of:
- Cluster’s infrastructure ready condition timestamp (if and when available)
- Control Plane’s initialized condition timestamp (if and when available)
- Machine’s infrastructure ready condition timestamp (if and when available)
- Machine’s metadata creation timestamp
Defaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.
- object
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate
remediationTemplate is a reference to a remediation template provided by an infrastructure provider.
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 Cluster API.
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .apiVersion
API version of the referent.
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .fieldPath
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.
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .resourceVersion
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
- string
.spec .workers .machineDeployments[] .machineHealthCheck .remediationTemplate .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- array
.spec .workers .machineDeployments[] .machineHealthCheck .unhealthyConditions
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.
- string required
.spec .workers .machineDeployments[] .machineHealthCheck .unhealthyConditions[] .status
status of the condition, one of True, False, Unknown.
- string required
.spec .workers .machineDeployments[] .machineHealthCheck .unhealthyConditions[] .timeout
timeout is the duration that a node must be in a given status for, after which the node is considered unhealthy. For example, with a value of “1h”, the node must match the status for at least 1 hour before being considered unhealthy.
- string required
.spec .workers .machineDeployments[] .machineHealthCheck .unhealthyConditions[] .type
type of Node condition
- string
.spec .workers .machineDeployments[] .machineHealthCheck .unhealthyRange
unhealthyRange specifies the range of unhealthy machines allowed. Any further remediation is only allowed if the number of machines selected by “selector” as not healthy is within the range of “unhealthyRange”. Takes precedence over maxUnhealthy. Eg. “[3-5]” - This means that remediation will be allowed only when: (a) there are at least 3 unhealthy machines (and) (b) there are at most 5 unhealthy machines
- integer
.spec .workers .machineDeployments[] .minReadySeconds
minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
- object
.spec .workers .machineDeployments[] .namingStrategy
namingStrategy allows changing the naming pattern used when creating the MachineDeployment.
- string
.spec .workers .machineDeployments[] .namingStrategy .template
template defines the template to use for generating the name of the MachineDeployment object. If not defined, it will fallback to
{{ .cluster.name }}-{{ .machineDeployment.topologyName }}-{{ .random }}
. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments:.cluster.name
: The name of the cluster object..random
: A random alphanumeric string, without vowels, of length 5..machineDeployment.topologyName
: The name of the MachineDeployment topology (Cluster.spec.topology.workers.machineDeployments[].name).
- string
.spec .workers .machineDeployments[] .nodeDeletionTimeout
nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
- string
.spec .workers .machineDeployments[] .nodeDrainTimeout
nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from
kubectl drain --timeout
NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass. - string
.spec .workers .machineDeployments[] .nodeVolumeDetachTimeout
nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
- array
.spec .workers .machineDeployments[] .readinessGates
readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
This field can be used e.g. to instruct the machine controller to include in the computation for Machine’s ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.
NOTE: This field is considered only for computing v1beta2 conditions. NOTE: If a Cluster defines a custom list of readinessGates for a MachineDeployment using this MachineDeploymentClass, such list overrides readinessGates defined in this field.
- string required
.spec .workers .machineDeployments[] .readinessGates[] .conditionType
conditionType refers to a condition with matching type in the Machine’s condition list. If the conditions doesn’t exist, it will be treated as unknown. Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates.
- string
.spec .workers .machineDeployments[] .readinessGates[] .polarity
polarity of the conditionType specified in this readinessGate. Valid values are Positive, Negative and omitted. When omitted, the default behaviour will be Positive. A positive polarity means that the condition should report a true status under normal conditions. A negative polarity means that the condition should report a false status under normal conditions.
- object
.spec .workers .machineDeployments[] .strategy
strategy is the deployment strategy to use to replace existing machines with new ones. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.
- object
.spec .workers .machineDeployments[] .strategy .remediation
remediation controls the strategy of remediating unhealthy machines and how remediating operations should occur during the lifecycle of the dependant MachineSets.
- integer | string
.spec .workers .machineDeployments[] .strategy .remediation .maxInFlight
maxInFlight determines how many in flight remediations should happen at the same time.
Remediation only happens on the MachineSet with the most current revision, while older MachineSets (usually present during rollout operations) aren’t allowed to remediate.
Note: In general (independent of remediations), unhealthy machines are always prioritized during scale down operations over healthy ones.
MaxInFlight can be set to a fixed number or a percentage. Example: when this is set to 20%, the MachineSet controller deletes at most 20% of the desired replicas.
If not set, remediation is limited to all machines (bounded by replicas) under the active MachineSet’s management.
- object
.spec .workers .machineDeployments[] .strategy .rollingUpdate
rollingUpdate is the rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.
- string
.spec .workers .machineDeployments[] .strategy .rollingUpdate .deletePolicy
deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. Valid values are “Random, “Newest”, “Oldest” When no value is supplied, the default DeletePolicy of MachineSet is used
- integer | string
.spec .workers .machineDeployments[] .strategy .rollingUpdate .maxSurge
maxSurge is the maximum number of machines that can be scheduled above the desired number of machines. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 1. Example: when this is set to 30%, the new MachineSet can be scaled up immediately when the rolling update starts, such that the total number of old and new machines do not exceed 130% of desired machines. Once old machines have been killed, new MachineSet can be scaled up further, ensuring that total number of machines running at any time during the update is at most 130% of desired machines.
- string
.spec .workers .machineDeployments[] .strategy .type
type of deployment. Allowed values are RollingUpdate and OnDelete. The default is RollingUpdate.
- object required
.spec .workers .machineDeployments[] .template
template is a local struct containing a collection of templates for creation of MachineDeployment objects representing a set of worker nodes.
- object required
.spec .workers .machineDeployments[] .template .bootstrap
bootstrap contains the bootstrap template reference to be used for the creation of worker Machines.
- object required
.spec .workers .machineDeployments[] .template .bootstrap .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .apiVersion
API version of the referent.
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .fieldPath
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.
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .resourceVersion
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
- string
.spec .workers .machineDeployments[] .template .bootstrap .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object required
.spec .workers .machineDeployments[] .template .infrastructure
infrastructure contains the infrastructure template reference to be used for the creation of worker Machines.
- object required
.spec .workers .machineDeployments[] .template .infrastructure .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .apiVersion
API version of the referent.
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .fieldPath
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.
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .resourceVersion
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
- string
.spec .workers .machineDeployments[] .template .infrastructure .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object
.spec .workers .machineDeployments[] .template .metadata
metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the topology.
- object
.spec .workers .machineDeployments[] .template .metadata .annotations
annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
- object
.spec .workers .machineDeployments[] .template .metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
- array
.spec .workers .machinePools
machinePools is a list of machine pool classes that can be used to create a set of worker nodes.
- string required
.spec .workers .machinePools[] .class
class denotes a type of machine pool present in the cluster, this name MUST be unique within a ClusterClass and can be referenced in the Cluster to create a managed MachinePool.
- array
.spec .workers .machinePools[] .failureDomains
failureDomains is the list of failure domains the MachinePool should be attached to. Must match a key in the FailureDomains map stored on the cluster object. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.
- integer
.spec .workers .machinePools[] .minReadySeconds
minReadySeconds is the minimum number of seconds for which a newly created machine pool should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.
- object
.spec .workers .machinePools[] .namingStrategy
namingStrategy allows changing the naming pattern used when creating the MachinePool.
- string
.spec .workers .machinePools[] .namingStrategy .template
template defines the template to use for generating the name of the MachinePool object. If not defined, it will fallback to
{{ .cluster.name }}-{{ .machinePool.topologyName }}-{{ .random }}
. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments:.cluster.name
: The name of the cluster object..random
: A random alphanumeric string, without vowels, of length 5..machinePool.topologyName
: The name of the MachinePool topology (Cluster.spec.topology.workers.machinePools[].name).
- string
.spec .workers .machinePools[] .nodeDeletionTimeout
nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine Pool is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.
- string
.spec .workers .machinePools[] .nodeDrainTimeout
nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from
kubectl drain --timeout
NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass. - string
.spec .workers .machinePools[] .nodeVolumeDetachTimeout
nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.
- object required
.spec .workers .machinePools[] .template
template is a local struct containing a collection of templates for creation of MachinePools objects representing a pool of worker nodes.
- object required
.spec .workers .machinePools[] .template .bootstrap
bootstrap contains the bootstrap template reference to be used for the creation of the Machines in the MachinePool.
- object required
.spec .workers .machinePools[] .template .bootstrap .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .workers .machinePools[] .template .bootstrap .ref .apiVersion
API version of the referent.
- string
.spec .workers .machinePools[] .template .bootstrap .ref .fieldPath
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.
- string
.spec .workers .machinePools[] .template .bootstrap .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .workers .machinePools[] .template .bootstrap .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .workers .machinePools[] .template .bootstrap .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .workers .machinePools[] .template .bootstrap .ref .resourceVersion
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
- string
.spec .workers .machinePools[] .template .bootstrap .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object required
.spec .workers .machinePools[] .template .infrastructure
infrastructure contains the infrastructure template reference to be used for the creation of the MachinePool.
- object required
.spec .workers .machinePools[] .template .infrastructure .ref
ref is a required reference to a custom resource offered by a provider.
- string
.spec .workers .machinePools[] .template .infrastructure .ref .apiVersion
API version of the referent.
- string
.spec .workers .machinePools[] .template .infrastructure .ref .fieldPath
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.
- string
.spec .workers .machinePools[] .template .infrastructure .ref .kind
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- string
.spec .workers .machinePools[] .template .infrastructure .ref .name
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- string
.spec .workers .machinePools[] .template .infrastructure .ref .namespace
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- string
.spec .workers .machinePools[] .template .infrastructure .ref .resourceVersion
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
- string
.spec .workers .machinePools[] .template .infrastructure .ref .uid
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
- object
.spec .workers .machinePools[] .template .metadata
metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the topology.
- object
.spec .workers .machinePools[] .template .metadata .annotations
annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
- object
.spec .workers .machinePools[] .template .metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
- object
.status
status is the observed state of ClusterClass.
- array
.status .conditions
conditions represents the observations of a ClusterClass’s current state. Known condition types are VariablesReady, RefVersionsUpToDate, Paused.
- string required
.status .conditions[] .lastTransitionTime
lastTransitionTime is the 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.
- string required
.status .conditions[] .message
message is a human readable message indicating details about the transition. This may be an empty string.
- integer
.status .conditions[] .observedGeneration
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
- string required
.status .conditions[] .reason
reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
- string required
.status .conditions[] .status
status of the condition, one of True, False, Unknown.
- string required
.status .conditions[] .type
type of condition in CamelCase or in foo.example.com/CamelCase.
- object
.status .deprecated
deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
- object
.status .deprecated .v1beta1
v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
- array
.status .deprecated .v1beta1 .conditions
conditions defines current observed state of the ClusterClass.
Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
- string required
.status .deprecated .v1beta1 .conditions[] .lastTransitionTime
lastTransitionTime is the 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.
- string
.status .deprecated .v1beta1 .conditions[] .message
message is a human readable message indicating details about the transition. This field may be empty.
- string
.status .deprecated .v1beta1 .conditions[] .reason
reason is 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 be empty.
- string
.status .deprecated .v1beta1 .conditions[] .severity
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.
- string required
.status .deprecated .v1beta1 .conditions[] .status
status of the condition, one of True, False, Unknown.
- string required
.status .deprecated .v1beta1 .conditions[] .type
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.
- integer
.status .observedGeneration
observedGeneration is the latest generation observed by the controller.
- array
.status .variables
variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass.
- array required
.status .variables[] .definitions
definitions is a list of definitions for a variable.
- string required
.status .variables[] .definitions[] .from
from specifies the origin of the variable definition. This will be
inline
for variables defined in the ClusterClass or the name of a patch defined in the ClusterClass for variables discovered from a DiscoverVariables runtime extensions. - object
.status .variables[] .definitions[] .metadata
metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.
Deprecated: This field is deprecated and is going to be removed in the next apiVersion.
- object
.status .variables[] .definitions[] .metadata .annotations
annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.
- object
.status .variables[] .definitions[] .metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.
- boolean required
.status .variables[] .definitions[] .required
required specifies if the variable is required. Note: this applies to the variable as a whole and thus the top-level object defined in the schema. If nested fields are required, this will be specified inside the schema.
- object required
.status .variables[] .definitions[] .schema
schema defines the schema of the variable.
- object required
.status .variables[] .definitions[] .schema .openAPIV3Schema
openAPIV3Schema defines the schema of a variable via OpenAPI v3 schema. The schema is a subset of the schema used in Kubernetes CRDs.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .additionalProperties
additionalProperties specifies the schema of values in a map (keys are always strings). NOTE: Can only be set if type is object. NOTE: AdditionalProperties is mutually exclusive with Properties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .allOf
allOf specifies that the variable must validate against all of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .anyOf
anyOf specifies that the variable must validate against one or more of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .default
default is the default value of the variable. NOTE: Can be set for all types.
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .description
description is a human-readable description of this variable.
- array
.status .variables[] .definitions[] .schema .openAPIV3Schema .enum
enum is the list of valid values of the variable. NOTE: Can be set for all types.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .example
example is an example for this variable.
- boolean
.status .variables[] .definitions[] .schema .openAPIV3Schema .exclusiveMaximum
exclusiveMaximum specifies if the Maximum is exclusive. NOTE: Can only be set if type is integer or number.
- boolean
.status .variables[] .definitions[] .schema .openAPIV3Schema .exclusiveMinimum
exclusiveMinimum specifies if the Minimum is exclusive. NOTE: Can only be set if type is integer or number.
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .format
format is an OpenAPI v3 format string. Unknown formats are ignored. For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we’re currently using) https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go NOTE: Can only be set if type is string.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .items
items specifies fields of an array. NOTE: Can only be set if type is array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .maxItems
maxItems is the max length of an array variable. NOTE: Can only be set if type is array.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .maxLength
maxLength is the max length of a string variable. NOTE: Can only be set if type is string.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .maxProperties
maxProperties is the maximum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .maximum
maximum is the maximum of an integer or number variable. If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. NOTE: Can only be set if type is integer or number.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .minItems
minItems is the min length of an array variable. NOTE: Can only be set if type is array.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .minLength
minLength is the min length of a string variable. NOTE: Can only be set if type is string.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .minProperties
minProperties is the minimum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.
- integer
.status .variables[] .definitions[] .schema .openAPIV3Schema .minimum
minimum is the minimum of an integer or number variable. If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. NOTE: Can only be set if type is integer or number.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .not
not specifies that the variable must not validate against the subschema. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .oneOf
oneOf specifies that the variable must validate against exactly one of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .pattern
pattern is the regex which a string variable must match. NOTE: Can only be set if type is string.
- undefined
.status .variables[] .definitions[] .schema .openAPIV3Schema .properties
properties specifies fields of an object. NOTE: Can only be set if type is object. NOTE: Properties is mutually exclusive with AdditionalProperties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.
- array
.status .variables[] .definitions[] .schema .openAPIV3Schema .required
required specifies which fields of an object are required. NOTE: Can only be set if type is object.
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .type
type is the type of the variable. Valid values are: object, array, string, integer, number or boolean.
- boolean
.status .variables[] .definitions[] .schema .openAPIV3Schema .uniqueItems
uniqueItems specifies if items in an array must be unique. NOTE: Can only be set if type is array.
- boolean
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-int-or-string
x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:
- anyOf:
- type: integer
- type: string
- allOf:
- anyOf:
- type: integer
- type: string
- … zero or more
- anyOf:
- anyOf:
- boolean
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-preserve-unknown-fields
x-kubernetes-preserve-unknown-fields allows setting fields in a variable object which are not defined in the variable schema. This affects fields recursively, except if nested properties or additionalProperties are specified in the schema.
- array
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations
x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations[] .fieldPath
fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute
foo
under a maptestMap
, the fieldPath could be set to.testMap.foo
If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g..testList
It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to JSONPath support in Kubernetes for more info. Numeric index of array is not supported. For field name which contains special characters, use['specialName']
to refer the field name. e.g. for attributefoo.34$
appears in a listtestList
, the fieldPath could be set to.testList['foo.34$']
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations[] .message
message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host”
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations[] .messageExpression
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: “x must be less than max (“+string(self.max)+”)”
- string
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations[] .reason
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The currently supported reasons are: “FieldValueInvalid”, “FieldValueForbidden”, “FieldValueRequired”, “FieldValueDuplicate”. If not set, default to use “FieldValueInvalid”. All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.
- string required
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-kubernetes-validations[] .rule
rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The
self
variable in the CEL expression is bound to the scoped value. If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable viaself.field
and field presence can be checked viahas(self.field)
. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible viaself[mapKey]
, map containment can be checked viamapKey in self
and all entries of the map are accessible via CEL macros and functions such asself.all(...)
. If the Rule is scoped to an array, the elements of the array are accessible viaself[i]
and also by macros and functions. If the Rule is scoped to a scalar,self
is bound to the scalar value. Examples:- Rule scoped to a map of objects: {“rule”: “self.components[‘Widget’].priority < 10"}
- Rule scoped to a list of integers: {“rule”: “self.values.all(value, value >= 0 && value < 100)"}
- Rule scoped to a string value: {“rule”: “self.startsWith(‘kube’)”}
Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes:
- Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields.
- Object properties where the property schema is of an “unknown type”. An “unknown type” is recursively defined as:
- A schema with no type and x-kubernetes-preserve-unknown-fields set to true
- An array where the items schema is of an “unknown type”
- An object where the additionalProperties schema is of an “unknown type”
Only property names of the form
[a-zA-Z_.-/][a-zA-Z0-9_.-/]*
are accessible. Accessible property names are escaped according to the following rules when accessed in the expression:- ’__’ escapes to ‘underscores’
- ’.’ escapes to ‘dot’
- ’-’ escapes to ‘dash’
- ’/’ escapes to ‘slash’
- Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}’. The keywords are: “true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”, “import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Rule accessing a property named “namespace”: {“rule”: “self.namespace > 0”}
- Rule accessing a property named “x-prop”: {“rule”: “self.x__dash__prop > 0”}
- Rule accessing a property named “redact__d”: {“rule”: “self.redact__underscores__d > 0”}
If
rule
makes use of theoldSelf
variable it is implicitly atransition rule
.By default, the
oldSelf
variable is the same type asself
.Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found.
- object
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-metadata
x-metadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.
- object
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-metadata .annotations
annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.
- object
.status .variables[] .definitions[] .schema .openAPIV3Schema .x-metadata .labels
labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.
- boolean
.status .variables[] .definitionsConflict
definitionsConflict specifies whether or not there are conflicting definitions for a single variable name.
- string required
.status .variables[] .name
name is the name of the variable.