{
    "description": "NodePool is the Schema for the nodepools API",
    "properties": {
        "apiVersion": {
            "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
            "type": "string"
        },
        "kind": {
            "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
            "type": "string"
        },
        "metadata": {
            "type": "object"
        },
        "spec": {
            "description": "NodePoolSpec defines the desired state of NodePool",
            "properties": {
                "autoscaling": {
                    "default": false,
                    "description": "Autoscaling indicates whether a cluster has autoscaling enabled",
                    "type": "boolean"
                },
                "cloudInit": {
                    "description": "CloudInit contains optional data to bootstrap each node via cloud\u2011init.\nIf provided, both Data and\nType (only \"bash\" currently) must be set.",
                    "properties": {
                        "data": {
                            "description": "Data is the cloud-init configuration to use for the nodes in the node pool",
                            "type": "string"
                        },
                        "type": {
                            "default": "bash",
                            "description": "Type is the cloud init config type, just bash available currently",
                            "enum": [
                                "bash"
                            ],
                            "type": "string"
                        }
                    },
                    "required": [
                        "data",
                        "type"
                    ],
                    "type": "object",
                    "additionalProperties": false
                },
                "computeClass": {
                    "default": "default",
                    "description": "ComputeClass represents the class of compute for nodes assigned to the NodePool. Enum value can be set on object creation only.",
                    "enum": [
                        "default",
                        "spot"
                    ],
                    "type": "string",
                    "x-kubernetes-validations": [
                        {
                            "message": "ComputeClass cannot be changed.",
                            "rule": "self == oldSelf"
                        }
                    ]
                },
                "gpu": {
                    "description": "Gpu allows the user to specify the GPU driver version to use for the nodes in the node pool",
                    "properties": {
                        "release": {
                            "description": "Release is the release version to use for the nodes in the node profile",
                            "type": "string"
                        },
                        "version": {
                            "description": "Version for the particular GPU Driver",
                            "type": "string"
                        }
                    },
                    "type": "object",
                    "x-kubernetes-validations": [
                        {
                            "message": "Only Release or Version can be set, not both.",
                            "rule": "has(self.release) != has(self.version)"
                        }
                    ],
                    "additionalProperties": false
                },
                "image": {
                    "description": "Image is the image to use for the nodes in the node pool",
                    "properties": {
                        "kargs": {
                            "description": "Kargs represents kernel arguments configuration for the nodes in the node pool.\nIt allows specifying additional arguments to append or overwrite existing ones.",
                            "properties": {
                                "append": {
                                    "description": "Append specifies additional kernel arguments to be appended.",
                                    "items": {
                                        "type": "string"
                                    },
                                    "type": "array"
                                },
                                "overwrite": {
                                    "description": "Overwrite specifies kernel arguments that overwrite existing ones.",
                                    "items": {
                                        "type": "string"
                                    },
                                    "type": "array"
                                }
                            },
                            "type": "object",
                            "x-kubernetes-validations": [
                                {
                                    "message": "Only Append or Overwrite can be set, not both.",
                                    "rule": "has(self.append) != has(self.overwrite)"
                                }
                            ],
                            "additionalProperties": false
                        },
                        "kernel": {
                            "default": "",
                            "description": "Kernel is the kernel version to use for the nodes in the node profile",
                            "type": "string"
                        },
                        "name": {
                            "default": "",
                            "description": "Name of the image to use on a given node pool",
                            "type": "string"
                        },
                        "releaseTrain": {
                            "default": "stable",
                            "description": "ReleaseTrain indicates the release version used when booting Node.",
                            "enum": [
                                "stable",
                                "latest"
                            ],
                            "type": "string"
                        }
                    },
                    "type": "object",
                    "x-kubernetes-validations": [
                        {
                            "message": "If Name is set Kernel must be empty and ReleaseTrain must be empty.",
                            "rule": "self.name == \"\" || (self.kernel == \"\" && self.releaseTrain == \"stable\")"
                        }
                    ],
                    "additionalProperties": false
                },
                "instanceType": {
                    "description": "Instance Type for the particular node (can be cpu or gpu)",
                    "type": "string",
                    "x-kubernetes-validations": [
                        {
                            "message": "InstanceType cannot be changed.",
                            "rule": "self == oldSelf"
                        }
                    ]
                },
                "lifecycle": {
                    "default": {},
                    "description": "Lifecycle contains all information related to node lifecycle",
                    "properties": {
                        "disableUnhealthyNodeEviction": {
                            "default": false,
                            "description": "DisableUnhealthyNodeEviction determines if the UnhealthyNodeEviction process is enabled on this nodePool\nA value of true will cause unhealthy nodes to remain in cluster, disabling the automatic removal process\nA value of false indicates normal behavior where unhealthy nodes are removed from the cluster",
                            "type": "boolean"
                        },
                        "scaleDownStrategy": {
                            "default": "IdleOnly",
                            "description": "ScaleDownStrategy configures how nodes are selected to remove when scaling down the NodePool. IdleOnly indicates that\nonly idle nodes will be scaled down. PreferIdle indicates that idle nodes will be scaled down first, then nodes\n(potentially non-idle) will be selected at random until targetNodes is reached.",
                            "enum": [
                                "IdleOnly",
                                "PreferIdle"
                            ],
                            "type": "string"
                        }
                    },
                    "type": "object",
                    "additionalProperties": false
                },
                "maxNodes": {
                    "description": "MaxNodes is the maximum number of nodes that TargetNodes can be set to by the autoscaler",
                    "type": "integer"
                },
                "minNodes": {
                    "description": "MinNodes is the minimum number of nodes that TargetNodes can be set to by the autoscaler",
                    "type": "integer"
                },
                "nodeAffinity": {
                    "description": "NodeAffinity describes assignment constraints for nodes",
                    "properties": {
                        "preferredDuringSchedulingIgnoredDuringExecution": {
                            "description": "The scheduler will prefer to schedule pods to nodes that satisfy\nthe affinity expressions specified by this field, but it may choose\na node that violates one or more of the expressions. The node that is\nmost preferred is the one with the greatest sum of weights, i.e.\nfor each node that meets all of the scheduling requirements (resource\nrequest, requiredDuringScheduling affinity expressions, etc.),\ncompute a sum by iterating through the elements of this field and adding\n\"weight\" to the sum if the node matches the corresponding matchExpressions; the\nnode(s) with the highest sum are the most preferred.",
                            "items": {
                                "description": "An empty preferred scheduling term matches all objects with implicit weight 0\n(i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
                                "properties": {
                                    "preference": {
                                        "description": "A node selector term, associated with the corresponding weight.",
                                        "properties": {
                                            "matchExpressions": {
                                                "description": "A list of node selector requirements by node's labels.",
                                                "items": {
                                                    "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                                                    "properties": {
                                                        "key": {
                                                            "description": "The label key that the selector applies to.",
                                                            "type": "string"
                                                        },
                                                        "operator": {
                                                            "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                                                            "type": "string"
                                                        },
                                                        "values": {
                                                            "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "type": "array",
                                                            "x-kubernetes-list-type": "atomic"
                                                        }
                                                    },
                                                    "required": [
                                                        "key",
                                                        "operator"
                                                    ],
                                                    "type": "object",
                                                    "additionalProperties": false
                                                },
                                                "type": "array",
                                                "x-kubernetes-list-type": "atomic"
                                            },
                                            "matchFields": {
                                                "description": "A list of node selector requirements by node's fields.",
                                                "items": {
                                                    "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                                                    "properties": {
                                                        "key": {
                                                            "description": "The label key that the selector applies to.",
                                                            "type": "string"
                                                        },
                                                        "operator": {
                                                            "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                                                            "type": "string"
                                                        },
                                                        "values": {
                                                            "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "type": "array",
                                                            "x-kubernetes-list-type": "atomic"
                                                        }
                                                    },
                                                    "required": [
                                                        "key",
                                                        "operator"
                                                    ],
                                                    "type": "object",
                                                    "additionalProperties": false
                                                },
                                                "type": "array",
                                                "x-kubernetes-list-type": "atomic"
                                            }
                                        },
                                        "type": "object",
                                        "x-kubernetes-map-type": "atomic",
                                        "additionalProperties": false
                                    },
                                    "weight": {
                                        "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
                                        "format": "int32",
                                        "type": "integer"
                                    }
                                },
                                "required": [
                                    "preference",
                                    "weight"
                                ],
                                "type": "object",
                                "additionalProperties": false
                            },
                            "type": "array",
                            "x-kubernetes-list-type": "atomic"
                        },
                        "requiredDuringSchedulingIgnoredDuringExecution": {
                            "description": "If the affinity requirements specified by this field are not met at\nscheduling time, the pod will not be scheduled onto the node.\nIf the affinity requirements specified by this field cease to be met\nat some point during pod execution (e.g. due to an update), the system\nmay or may not try to eventually evict the pod from its node.",
                            "properties": {
                                "nodeSelectorTerms": {
                                    "description": "Required. A list of node selector terms. The terms are ORed.",
                                    "items": {
                                        "description": "A null or empty node selector term matches no objects. The requirements of\nthem are ANDed.\nThe TopologySelectorTerm type implements a subset of the NodeSelectorTerm.",
                                        "properties": {
                                            "matchExpressions": {
                                                "description": "A list of node selector requirements by node's labels.",
                                                "items": {
                                                    "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                                                    "properties": {
                                                        "key": {
                                                            "description": "The label key that the selector applies to.",
                                                            "type": "string"
                                                        },
                                                        "operator": {
                                                            "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                                                            "type": "string"
                                                        },
                                                        "values": {
                                                            "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "type": "array",
                                                            "x-kubernetes-list-type": "atomic"
                                                        }
                                                    },
                                                    "required": [
                                                        "key",
                                                        "operator"
                                                    ],
                                                    "type": "object",
                                                    "additionalProperties": false
                                                },
                                                "type": "array",
                                                "x-kubernetes-list-type": "atomic"
                                            },
                                            "matchFields": {
                                                "description": "A list of node selector requirements by node's fields.",
                                                "items": {
                                                    "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                                                    "properties": {
                                                        "key": {
                                                            "description": "The label key that the selector applies to.",
                                                            "type": "string"
                                                        },
                                                        "operator": {
                                                            "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                                                            "type": "string"
                                                        },
                                                        "values": {
                                                            "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "type": "array",
                                                            "x-kubernetes-list-type": "atomic"
                                                        }
                                                    },
                                                    "required": [
                                                        "key",
                                                        "operator"
                                                    ],
                                                    "type": "object",
                                                    "additionalProperties": false
                                                },
                                                "type": "array",
                                                "x-kubernetes-list-type": "atomic"
                                            }
                                        },
                                        "type": "object",
                                        "x-kubernetes-map-type": "atomic",
                                        "additionalProperties": false
                                    },
                                    "type": "array",
                                    "x-kubernetes-list-type": "atomic"
                                }
                            },
                            "required": [
                                "nodeSelectorTerms"
                            ],
                            "type": "object",
                            "x-kubernetes-map-type": "atomic",
                            "additionalProperties": false
                        }
                    },
                    "type": "object",
                    "additionalProperties": false
                },
                "nodeAnnotations": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "NodeAnnotations is the list of all annotations associated with the Nodes in the node pool",
                    "type": "object"
                },
                "nodeLabels": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "NodeLabels is the list of all labels associated with the Nodes in the node pool",
                    "type": "object"
                },
                "nodeParameters": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "description": "NodeParameters is an optional map of key-value pairs that can be used\nto tune the nodePool's nodes.",
                    "type": "object"
                },
                "nodeTaints": {
                    "description": "NodeTaints is the list of all taints associated with the Nodes in the node pool",
                    "items": {
                        "description": "The node this Taint is attached to has the \"effect\" on\nany pod that does not tolerate the Taint.",
                        "properties": {
                            "effect": {
                                "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute.",
                                "type": "string"
                            },
                            "key": {
                                "description": "Required. The taint key to be applied to a node.",
                                "type": "string"
                            },
                            "timeAdded": {
                                "description": "TimeAdded represents the time at which the taint was added.\nIt is only written for NoExecute taints.",
                                "format": "date-time",
                                "type": "string"
                            },
                            "value": {
                                "description": "The taint value corresponding to the taint key.",
                                "type": "string"
                            }
                        },
                        "required": [
                            "effect",
                            "key"
                        ],
                        "type": "object",
                        "additionalProperties": false
                    },
                    "type": "array"
                },
                "targetNodes": {
                    "description": "TargetNodes is the quantity of desired nodes in the NodePool",
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                }
            },
            "required": [
                "instanceType",
                "targetNodes"
            ],
            "type": "object",
            "x-kubernetes-validations": [
                {
                    "message": "MinNodes must be greater than or equal to 0 when Autoscaling is enabled.",
                    "rule": "(!self.autoscaling || self.minNodes >= 0)"
                },
                {
                    "message": "MaxNodes must be greater than 0 when Autoscaling is enabled.",
                    "rule": "(!self.autoscaling || self.maxNodes > 0)"
                }
            ],
            "additionalProperties": false
        },
        "status": {
            "description": "NodePoolStatus defines the observed state of NodePool",
            "properties": {
                "allocatedNodes": {
                    "description": "AllocatedNodes is the quantity of nodes that have been allocated to the NodePool. If sufficient capacity\nis available this will match the `.spec.targetNodes` else it will be lower indicating a lack of capacity\nfor the requested instanceType.\nDeprecated: AllocatedNodes will be replaced by InProgress.",
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                },
                "conditions": {
                    "description": "Conditions is the list of all conditions associated with the NodePool",
                    "items": {
                        "description": "Condition contains details for one aspect of the current state of this API Resource.",
                        "properties": {
                            "lastTransitionTime": {
                                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                                "format": "date-time",
                                "type": "string"
                            },
                            "message": {
                                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                                "maxLength": 32768,
                                "type": "string"
                            },
                            "observedGeneration": {
                                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                            },
                            "reason": {
                                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                                "maxLength": 1024,
                                "minLength": 1,
                                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                                "type": "string"
                            },
                            "status": {
                                "description": "status of the condition, one of True, False, Unknown.",
                                "enum": [
                                    "True",
                                    "False",
                                    "Unknown"
                                ],
                                "type": "string"
                            },
                            "type": {
                                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                                "maxLength": 316,
                                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                                "type": "string"
                            }
                        },
                        "required": [
                            "lastTransitionTime",
                            "message",
                            "reason",
                            "status",
                            "type"
                        ],
                        "type": "object",
                        "additionalProperties": false
                    },
                    "type": "array"
                },
                "currentNodes": {
                    "description": "CurrentNodes is the current quantity of nodes associated with the NodePool present in the cluster",
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                },
                "inProgress": {
                    "description": "InProgress is the count of Nodes progressing into the NodePool.",
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                },
                "nodeProfile": {
                    "description": "NodeProfile represent string of the NodeProfile",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        }
    },
    "type": "object"
}
