{
  "description": "ROSAMachinePool is the Schema for the rosamachinepools 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": "RosaMachinePoolSpec defines the desired state of RosaMachinePool.",
      "properties": {
        "additionalSecurityGroups": {
          "description": "AdditionalSecurityGroups is an optional set of security groups to associate\nwith all node instances of the machine pool.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "additionalTags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "AdditionalTags are user-defined tags to be added on the underlying EC2 instances associated with this machine pool.",
          "type": "object"
        },
        "autoRepair": {
          "default": true,
          "description": "AutoRepair specifies whether health checks should be enabled for machines\nin the NodePool. The default is true.",
          "type": "boolean"
        },
        "autoscaling": {
          "description": "Autoscaling specifies auto scaling behaviour for this MachinePool.\nrequired if Replicas is not configured",
          "properties": {
            "maxReplicas": {
              "minimum": 1,
              "type": "integer"
            },
            "minReplicas": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "availabilityZone": {
          "description": "AvailabilityZone is an optinal field specifying the availability zone where instances of this machine pool should run\nFor Multi-AZ clusters, you can create a machine pool in a Single-AZ of your choice.",
          "type": "string"
        },
        "instanceType": {
          "description": "InstanceType specifies the AWS instance type",
          "type": "string"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Labels specifies labels for the Kubernetes node objects",
          "type": "object"
        },
        "nodeDrainGracePeriod": {
          "description": "NodeDrainGracePeriod is grace period for how long Pod Disruption Budget-protected workloads will be\nrespected during upgrades. After this grace period, any workloads protected by Pod Disruption\nBudgets that have not been successfully drained from a node will be forcibly evicted.\n\n\nValid values are from 0 to 1 week(10080m|168h) .\n0 or empty value means that the MachinePool can be drained without any time limitation.",
          "type": "string"
        },
        "nodePoolName": {
          "description": "NodePoolName specifies the name of the nodepool in Rosa\nmust be a valid DNS-1035 label, so it must consist of lower case alphanumeric and have a max length of 15 characters.",
          "maxLength": 15,
          "pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?$",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "nodepoolName is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "providerIDList": {
          "description": "ProviderIDList contain a ProviderID for each machine instance that's currently managed by this machine pool.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "subnet": {
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "subnet is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "taints": {
          "description": "Taints specifies the taints to apply to the nodes of the machine pool",
          "items": {
            "description": "RosaTaint represents a taint to be applied to a node.",
            "properties": {
              "effect": {
                "description": "The effect of the taint on pods that do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute.",
                "enum": [
                  "NoSchedule",
                  "PreferNoSchedule",
                  "NoExecute"
                ],
                "type": "string"
              },
              "key": {
                "description": "The taint key to be applied to a node.",
                "type": "string"
              },
              "value": {
                "description": "The taint value corresponding to the taint key.",
                "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$",
                "type": "string"
              }
            },
            "required": [
              "effect",
              "key"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "tuningConfigs": {
          "description": "TuningConfigs specifies the names of the tuning configs to be applied to this MachinePool.\nTuning configs must already exist.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "updateConfig": {
          "description": "UpdateConfig specifies update configurations.",
          "properties": {
            "rollingUpdate": {
              "description": "RollingUpdate specifies MaxUnavailable & MaxSurge number of nodes during update.",
              "properties": {
                "maxSurge": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "default": 1,
                  "description": "MaxSurge is the maximum number of nodes that can be provisioned above the desired number of nodes.\nValue can be an absolute number (ex: 5) or a percentage of desired nodes (ex: 10%).\nAbsolute number is calculated from percentage by rounding up.\n\n\nMaxSurge can not be 0 if MaxUnavailable is 0, default is 1.\nBoth MaxSurge & MaxUnavailable must use the same units (absolute value or percentage).\n\n\nExample: when MaxSurge is set to 30%, new nodes can be provisioned immediately\nwhen the rolling update starts, such that the total number of old and new\nnodes do not exceed 130% of desired nodes. Once old nodes have been\ndeleted, new nodes can be provisioned, ensuring that total number of nodes\nrunning at any time during the update is at most 130% of desired nodes.",
                  "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                  "x-kubernetes-int-or-string": true
                },
                "maxUnavailable": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "default": 0,
                  "description": "MaxUnavailable is the maximum number of nodes that can be unavailable during the update.\nValue can be an absolute number (ex: 5) or a percentage of desired nodes (ex: 10%).\nAbsolute number is calculated from percentage by rounding down.\n\n\nMaxUnavailable can not be 0 if MaxSurge is 0, default is 0.\nBoth MaxUnavailable & MaxSurge must use the same units (absolute value or percentage).\n\n\nExample: when MaxUnavailable is set to 30%, old nodes can be deleted down to 70% of\ndesired nodes immediately when the rolling update starts. Once new nodes\nare ready, more old nodes be deleted, followed by provisioning new nodes,\nensuring that the total number of nodes available at all times during the\nupdate is at least 70% of desired nodes.",
                  "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
                  "x-kubernetes-int-or-string": true
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "version": {
          "description": "Version specifies the OpenShift version of the nodes associated with this machinepool.\nROSAControlPlane version is used if not set.",
          "type": "string"
        }
      },
      "required": [
        "instanceType",
        "nodePoolName"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "RosaMachinePoolStatus defines the observed state of RosaMachinePool.",
      "properties": {
        "conditions": {
          "description": "Conditions defines current service state of the managed machine pool",
          "items": {
            "description": "Condition defines an observation of a Cluster API resource operational state.",
            "properties": {
              "lastTransitionTime": {
                "description": "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\nthe API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.\nThis field may be empty.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may not be empty.",
                "type": "string"
              },
              "severity": {
                "description": "Severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "failureMessage": {
          "description": "FailureMessage will be set in the event that there is a terminal problem\nreconciling the state and will be set to a descriptive error message.\n\n\nThis field should not be set for transitive errors that a controller\nfaces that are expected to be fixed automatically over\ntime (like service outages), but instead indicate that something is\nfundamentally wrong with the spec or the configuration of\nthe controller, and that manual intervention is required.",
          "type": "string"
        },
        "id": {
          "description": "ID is the ID given by ROSA.",
          "type": "string"
        },
        "ready": {
          "default": false,
          "description": "Ready denotes that the RosaMachinePool nodepool has joined\nthe cluster",
          "type": "boolean"
        },
        "replicas": {
          "description": "Replicas is the most recently observed number of replicas.",
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "ready"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
